Commit Graph

151543 Commits

Author SHA1 Message Date
Lionel Landwerlin 8ad78671b3 anv: use local dynamic pointer more
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15310>
2022-03-24 10:49:07 +00:00
Lionel Landwerlin 1d250b7b95 anv: fix color write enable interaction with color mask
Color writes & color masks occupy the same fields in the BLEND_STATE
structure. So we need to store color mask (which are not dynamic) on
the pipeline to merge that information with color writes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b15bfe92f7 ("anv: implement VK_EXT_color_write_enable")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6111
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15310>
2022-03-24 10:49:07 +00:00
Lionel Landwerlin a4f502de32 anv: fix VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT state
First, there is a problem if you do the following

 vkCmdSetColorWriteEnableEXT(attachmentCount = 8)
 vkCmdBindPipeline(GFX, with attachmentCount = 4)
 vkCmdDraw()
 vkCmdBindPipeline(GFX, with attachmentCount = 8)
 vkCmdDraw()

Because in the dynamic state emission code we rely on the first
pipeline to figure the number of BLEND_STATE entries to prepare. This
is wrong, we should fill all entries so that the dynamic state works
regardless of the number of attachments in the pipeline. With regard
to the dynamic values, we should retain enable/disable values that do
not concern the current pipeline.

Second, 3DSTATE_WM was not always reemitted when the pipeline changed.
But since it is not emitted as part of the pipeline, this results in
inconsistent state being programmed.

Third, we end up disabling the fragment stage completely in some
cases. And that is programming the pipeline inconsistently and
triggering a hang on TGL.

v2: Fix comment (Tapani)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b15bfe92f7 ("anv: implement VK_EXT_color_write_enable")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15310>
2022-03-24 10:49:07 +00:00
Lionel Landwerlin f348103fce anv: fix dynamic state emission
The problem is that we missed looking at pipeline changes. Pipelines
hold bits of dynamic states and when it changes we might need to
reemit a packet.

v2: fix comment (Tapani)
    Add missing anv_cmd_buffer_needs_dynamic_state() use (Tapani)

Cc: mesa-stable
Fixes: 505d176a8e ("anv: disable baked in pipeline bits from dynamic emission path")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15310>
2022-03-24 10:49:07 +00:00
Lionel Landwerlin 1cd7d6ce37 anv: allow baking of 3DSTATE_DEPTH_BOUNDS in pipeline batch
If it's not dynamic.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15310>
2022-03-24 10:49:07 +00:00
Erik Faye-Lund 85c59cafd8 docs: add a minimal docs page for radv
RADV is the last driver in Mesa that doesn't have a webpage somewhere
that we can link to from mesa3d.org. So let's make a minimal docs article
for it where we link to relevant information elsewhere.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15494>
2022-03-24 10:08:45 +00:00
Corentin Noël 2aa8e56e52 virgl: Update virgl_protocol and use the provided constants
Allow for better readability of the code.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14473>
2022-03-24 10:50:21 +01:00
Boris Brezillon 04d812b2d0 Revert "ci: Disable windows-vs2019"
This reverts commit 04b80489d5.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15518>
2022-03-24 09:11:13 +00:00
Boris Brezillon aa0c543533 lavapipe: Don't use VK_OUTARRAY_MAKE()/vk_outarray_append()
MSVC doesn't support typeof(). If we want to keep compiling radv on
windows we need to use the typed variants of those macros.

Fixes: dc8fdab71e ("lavapipe: Use VK_OUTARRAY for GetPhysicalDeviceQueueFamilyProperties[2]")
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15518>
2022-03-24 09:11:13 +00:00
Boris Brezillon eb1d009a3e radv: Don't use VK_OUTARRAY_MAKE()/vk_outarray_append()
MSVC doesn't support typeof(). If we want to keep compiling radv on
windows we need to use the typed variants of those macros.

Fixes: 10d69d5f0b ("radv: fix returning empty drmFormatModifierTilingFeatures")
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15518>
2022-03-24 09:11:13 +00:00
Boris Brezillon 2daae1fab4 amd: Fix ac_gpu_info.c compilation on windows
Fixes: 75a783ea73 ("ac: Query the amdgpu MEC firmware version.")
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15518>
2022-03-24 09:11:13 +00:00
Boris Brezillon de039537da aco: Fix an MSVC warning
'warning C4804: '<<': unsafe use of type 'bool' in operation'

Fixes: 9934c86761 ("aco: use v_fma_mix to combine mul/add/fma input conversions")
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15518>
2022-03-24 09:11:13 +00:00
Cristian Ciocaltea f392960331 virgl/ci: Add support for dEQP GL vtest-ing
Provide the 'virpipe-on-gl' job for running dEQP GL tests on
virpipe/vtest.

The rationale is to help reducing the regressions in Virglrenderer CI
due to sharing the Mesa CI infrastructure.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15490>
2022-03-24 08:39:06 +00:00
Tomeu Vizoso 9f43dac0ca ci/freedreno: Increase console timeout for perf jobs
Piglit is very sparse in its status output and downloads of big traces
can take a while.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15527>
2022-03-24 05:33:54 +00:00
Tomeu Vizoso 22d45f99ff ci/iris: Increase console timeout for perf jobs
Piglit is very sparse in its status output and downloads of big traces
can take a while.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15527>
2022-03-24 05:33:54 +00:00
Lionel Landwerlin a55cc061fd iris: don't synchronize BO for batch decoding
We don't need to go to the kernel to synchronize the BO we want to
decode with INTEL_DEBUG=bat, mostly because we'll decode what was
written by the driver in the batch.

This also works around an issue in the simulation environment.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ac81f1890 ("iris: decoder fixes")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15517>
2022-03-24 04:59:44 +00:00
Jason Ekstrand 729f95a110 i915: Use the sin/cos lowering in nir_opt_algebraic.py
It's nearly identical.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15539>
2022-03-24 00:59:21 +00:00
Tomeu Vizoso d0e99e566f ci/freedreno: Update checksum for GolfWithYourFriends trace
The MR below changed the rendering slightly and the checksum isn't valid
any more:

"ir3, turnip, freedreno: Shader preambles"

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13148

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15526>
2022-03-24 00:04:20 +00:00
Mike Blumenkrantz 1e45254b97 zink: lower txp for array textures
this is also illegal according to spirv spec

fixes #6177

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15510>
2022-03-23 23:18:48 +00:00
Mike Blumenkrantz 7143a5a147 zink: lower txp for cube and ms textures
this is illegal according to spirv spec

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15510>
2022-03-23 23:18:48 +00:00
Mike Blumenkrantz 4e35ed8c67 nir/lower_tex: add txp lowering option for arrays
this is illegal in vulkan, so zink needs to be able to lower these

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15510>
2022-03-23 23:18:47 +00:00
Yonggang Luo 821c141f9d gallium: Remove unused macro PIPE_ARCH_SSSE3
After removal inline function `_mm_shuffle_epi8`, the
macro `PIPE_ARCH_SSSE3` have no need anymore, remove it too.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14077>
2022-03-23 21:44:04 +00:00
Yonggang Luo 55a5635fb2 llvmpipe: Revise u_sse.h to remove unused _mm_shuffle_epi8 inline function
error log:
```
[2/43] Compiling C object src/gallium/drivers/llvmpipe/libllvmpipe.a.p/lp_setup_tri.c.obj
FAILED: src/gallium/drivers/llvmpipe/libllvmpipe.a.p/lp_setup_tri.c.obj
"cc" "-Isrc/gallium/drivers/llvmpipe/libllvmpipe.a.p" "-Isrc/gallium/drivers/llvmpipe" "-I../../src/gallium/drivers/llvmpipe" "-I../../src/gallium/include" "-Isrc/gallium/auxiliary" "-I../../src/gallium/auxiliary" "-Iinclude" "-I../../include" "-Isrc" "-I../../src" "-Isrc/compiler/nir" "-I../../src/compiler/nir" "-Isrc/util" "-I../../src/util" "-IC:/CI-Tools/msys64/clang64/include" "-fvisibility=hidden" "-fcolor-diagnostics" "-Wall" "-Winvalid-pch" "-std=c11" "-O0" "-g" "-DPACKAGE_VERSION=\"22.0.0-devel\"" "-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"" "-DHAVE_WINDOWS_PLATFORM" "-DHAVE_SURFACELESS_PLATFORM" "-DUSE_ELF_TLS" "-DUSE_TLS_BEHIND_FUNCTIONS" "-DENABLE_ST_OMX_BELLAGIO=0" "-DENABLE_ST_OMX_TIZONIA=0" "-DEGL_NO_X11" "-DDEBUG" "-DHAVE___BUILTIN_BSWAP32" "-DHAVE___BUILTIN_BSWAP64" "-DHAVE___BUILTIN_CLZ" "-DHAVE___BUILTIN_CLZLL" "-DHAVE___BUILTIN_CTZ" "-DHAVE___BUILTIN_EXPECT" "-DHAVE___BUILTIN_FFS" "-DHAVE___BUILTIN_FFSLL" "-DHAVE___BUILTIN_POPCOUNT" "-DHAVE___BUILTIN_POPCOUNTLL" "-DHAVE___BUILTIN_UNREACHABLE" "-DHAVE___BUILTIN_TYPES_COMPATIBLE_P" "-DHAVE_FUNC_ATTRIBUTE_CONST" "-DHAVE_FUNC_ATTRIBUTE_FLATTEN" "-DHAVE_FUNC_ATTRIBUTE_MALLOC" "-DHAVE_FUNC_ATTRIBUTE_PURE" "-DHAVE_FUNC_ATTRIBUTE_UNUSED" "-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT" "-DHAVE_FUNC_ATTRIBUTE_WEAK" "-DHAVE_FUNC_ATTRIBUTE_FORMAT" "-DHAVE_FUNC_ATTRIBUTE_PACKED" "-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL" "-DHAVE_FUNC_ATTRIBUTE_ALIAS" "-DHAVE_FUNC_ATTRIBUTE_NORETURN" "-DHAVE_FUNC_ATTRIBUTE_VISIBILITY" "-DHAVE_UINT128" "-D_WINDOWS" "-D_WIN32_WINNT=0x0A00" "-DWINVER=0x0A00" "-DPIPE_SUBSYSTEM_WINDOWS_USER" "-D_USE_MATH_DEFINES" "-DUSE_SSE41" "-DUSE_GCC_ATOMIC_BUILTINS" "-DHAS_SCHED_H" "-DHAVE_CET_H" "-DHAVE_STRTOF" "-DHAVE_STRTOK_R" "-DHAVE_QSORT_S" "-DHAVE_ZLIB" "-DHAVE_ZSTD" "-DHAVE_COMPRESSION" "-DLLVM_AVAILABLE" "-DMESA_LLVM_VERSION_STRING=\"13.0.0\"" "-DLLVM_IS_SHARED=1" "-DDRAW_LLVM_AVAILABLE" "-DMESA_EXECMEM" "-DVK_USE_PLATFORM_WIN32_KHR" "-Werror=implicit-function-declaration" "-Werror=missing-prototypes" "-Werror=return-type" "-Werror=empty-body" "-Werror=incompatible-pointer-types" "-Werror=int-conversion" "-Wimplicit-fallthrough" "-Wno-missing-field-initializers" "-fno-math-errno" "-fno-trapping-math" "-Qunused-arguments" "-fno-common" "-Wno-microsoft-enum-value" "-Werror=format" "-Wformat-security" "-Werror=thread-safety" "-ffunction-sections" "-fdata-sections" "-pthread" "-D_FILE_OFFSET_BITS=64" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-Werror=pointer-arith" "-Werror=gnu-empty-initializer" -MD -MQ src/gallium/drivers/llvmpipe/libllvmpipe.a.p/lp_setup_tri.c.obj -MF "src/gallium/drivers/llvmpipe/libllvmpipe.a.p/lp_setup_tri.c.obj.d" -o src/gallium/drivers/llvmpipe/libllvmpipe.a.p/lp_setup_tri.c.obj "-c" ../../src/gallium/drivers/llvmpipe/lp_setup_tri.c
In file included from ../../src/gallium/drivers/llvmpipe/lp_setup_tri.c:37:
In file included from ../../src/gallium/drivers/llvmpipe/lp_setup_context.h:38:
In file included from ../../src/gallium/drivers/llvmpipe/lp_setup.h:31:
In file included from ../../src/gallium/drivers/llvmpipe/lp_jit.h:40:
In file included from ../../src/gallium/auxiliary/gallivm/lp_bld_limits.h:37:
In file included from ../../src/util/u_cpu_detect.h:41:
In file included from ../../src/util/u_thread.h:35:
In file included from ../../include/c11/threads.h:64:
In file included from ../../include/c11/threads_win32.h:58:
In file included from C:/CI-Tools/msys64/clang64/x86_64-w64-mingw32/include/windows.h:69:
In file included from C:/CI-Tools/msys64/clang64/x86_64-w64-mingw32/include/windef.h:9:
In file included from C:/CI-Tools/msys64/clang64/x86_64-w64-mingw32/include/minwindef.h:163:
In file included from C:/CI-Tools/msys64/clang64/x86_64-w64-mingw32/include/winnt.h:1555:
In file included from C:/CI-Tools/msys64/clang64/lib/clang/13.0.0/include/x86intrin.h:15:
In file included from C:/CI-Tools/msys64/clang64/lib/clang/13.0.0/include/immintrin.h:37:
C:/CI-Tools/msys64/clang64/lib/clang/13.0.0/include/tmmintrin.h:582:1: error: redefinition of '_mm_shuffle_epi8'
_mm_shuffle_epi8(__m128i __a, __m128i __b)
^
../../src/gallium/auxiliary/util/u_sse.h:159:1: note: previous definition is here
_mm_shuffle_epi8(__m128i a, __m128i mask)
^
1 error generated.

```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14077>
2022-03-23 21:44:04 +00:00
Georg Lehmann 81b2008af9 nir/legalize_16bit_sampler_srcs: Don't guess source type.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14895>
2022-03-23 20:55:39 +00:00
Georg Lehmann b5fe1187ec nir/fold_16bit_sampler_conversions: Fix src type mismatches.
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5996
Fixes: fb29cef8 ("nir: add many passes that lower and optimize 16-bit input/outputs and samplers")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14895>
2022-03-23 20:55:39 +00:00
Georg Lehmann 88ec73e5e8 nir/fold_16bit_sampler_conversions: Fix dest type mismatches.
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5996
Fixes: fb29cef8dd ("nir: add many passes that lower and optimize 16-bit input/outputs and samplers")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14895>
2022-03-23 20:55:39 +00:00
Georg Lehmann 798e47be51 nir/fold_16bit_sampler_conversions: Don't fold dest upcasts.
This is not a valid optimization.

Fixes: fb29cef8dd ("nir: add many passes that lower and optimize 16-bit input/outputs and samplers")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14895>
2022-03-23 20:55:39 +00:00
Cristian Ciocaltea 18111c3787 Revert "ci: Convert generate-env.sh to a POSIX compliant script"
This reverts commit 9904ea2c76 since it is
not able to properly escape all special characters (i.e. [']).

The POSIX conversion is not needed anymore, as we have made 'bash'
available in LAVA rootfs.

Reported-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15524>
2022-03-23 20:31:06 +00:00
Cristian Ciocaltea 315842e27c ci: Make bash available in LAVA rootfs
Ensure 'bash' shell interpreter is available in LAVA rootfs since it is
going to be a dependency requirement from several scripts, e.g.
generate-env.sh.

Suggested-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15524>
2022-03-23 20:31:06 +00:00
Kai Wasserbäch a5884df949 fix(clover): FTBFS: Added missing include for ConstantInt for LLVM 15
With LLVM 15 the include of llvm/IR/Constants.h is required for
ConstantInt.

This commit fixes an FTBFS.

Cc: mesa-stable
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15232>
2022-03-23 20:08:13 +00:00
Erik Faye-Lund 36d38b4386 docs: fixup breakage in release-calendar
Seems the branch was accidentally changed to no longer match the
release. Let's fix that.

Fixes: 9ba636cdc7 ("docs: update calendar and link releases notes for 21.3.8")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15528>
2022-03-23 20:01:44 +00:00
Mark Janes 85e314db5d Revert "intel/fs: handle interpolation modes for at_sample and at_offset too"
This reverts commit 5afbb0e730.

Closes: #6198
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15534>
2022-03-23 11:03:47 -07:00
Erik Faye-Lund 80a2974826 pvr: zero-initialize variable
Because of incomplete codepaths further down in this function, we end up
trying to use this variable without initialization. Let's initialize it
to zero, just to keep the compiler happy.

This avoids a compile-time warning, which would get treated as an error
on CI.

Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15525>
2022-03-23 16:49:14 +00:00
Erik Faye-Lund fd7203ce80 pvr: use a helper to translate stencil-ops
This gives us a single place to handle the conversion, and fixes a
compilation warning by adding an explicit cast.

Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15525>
2022-03-23 16:49:14 +00:00
Erik Faye-Lund cc171840ff pvr: use a helper to translate compare-ops
This gives us a single place to handle the conversion, and fixes a
compilation warning by adding an explicit cast.

Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15525>
2022-03-23 16:49:14 +00:00
Erik Faye-Lund f7e92c8869 microsoft/compiler: remove phi-value limit
There's no guarantee that we don't have more than 128 PHI values either,
so let's stop asuming so.

We do this by changing dxil_phi_set_incoming to dxil_phi_add_incoming,
which lets us add more incoming phi-values to the current one instead of
setting a new set of them.

This also lets us reduce these stack-arrays a bit, down to something
much more reasonable.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15519>
2022-03-23 16:33:21 +00:00
Erik Faye-Lund d752c4bc7c microsoft/compiler: ralloc incoming phi-values
Reserving 127 incoming values for every phi instruction is neither
robust nor memory efficient.

Let's ralloc this array instead when filling it. This way, we only pay
for what we use here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15519>
2022-03-23 16:33:21 +00:00
Alyssa Rosenzweig d8b5d45dc1 pan/va: Add atomic instructions
Equivalent to their Bifrost counterparts, with a much more sensible encoding.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15515>
2022-03-23 15:50:41 +00:00
Alyssa Rosenzweig 0ac9841809 pan/va: Allow omitting staging registers
It's not usually valid, but sr_count == 0 is encodable and used for the
non-RETURN variant of ATOM1. Allow dis/assembling this syntax.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15515>
2022-03-23 15:50:41 +00:00
Alyssa Rosenzweig e6ca668d45 pan/va: Allow forcing staging flags to read-write
Required for the correct encoding of atomics.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15515>
2022-03-23 15:50:41 +00:00
Daniel Schürmann 832d67e99d nir: rename nir_src_is_dynamically_uniform to nir_src_is_always_uniform
As this function doesn't check for any control-flow
dependence, it only returns true for statically
(or globally) uniform values.
The same holds true for is_binding_dynamically_uniform()
in nir_opt_gcm().
Rename to better reflect that property.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14994>
2022-03-23 14:02:08 +00:00
Erik Faye-Lund a9eddf9edc pvr: fixup typos when allocating object
These objects should have been allocated with
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT as the last argument, not the specific
object type.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15521>
2022-03-23 14:17:34 +01:00
Erik Faye-Lund abf995b1da pvr: use zloadformat instead of zstoreformat
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15521>
2022-03-23 14:17:34 +01:00
Thomas H.P. Andersen 8138086889 pvr: fix overlapping comparison
The comparison here will always be true. This changes it so
height is only set if the type is not a 1D.

Fixes a warning with clang

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15514>
2022-03-23 13:04:38 +00:00
Lionel Landwerlin df059c6781 intel/clc: deal with SPIRV-Tools linker new behavior
We're now required to provide all modules to link at the same SPIRV
version.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15486>
2022-03-23 10:24:31 +00:00
Lionel Landwerlin 21aa1d3de1 intel/clc: fixup shared memory offsets
We're running the io lowering twice so need to reset some fields so
the offset don't go over what is really needed.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15486>
2022-03-23 10:24:31 +00:00
Lionel Landwerlin de9c2312ea intel/clc: compile fix
Fixes: c15bf88f01 ("intel: Add a little OpenCL C compiler binary")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15486>
2022-03-23 10:24:31 +00:00
Lionel Landwerlin a7f264f33a intel/clc: add option to printout kernel prog_data
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15486>
2022-03-23 10:24:31 +00:00
Lionel Landwerlin 451f907d16 intel/kernel: enable linkage cap
Linkage should have happened before this in intel_clc. This just
silence a parser warning.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15486>
2022-03-23 10:24:31 +00:00
Lionel Landwerlin bb4ff3e6e2 intel/kernel: enable groups caps
This is roughly the same as SpvCapabilityGroupNonUniform
(subgroup_basic).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15486>
2022-03-23 10:24:31 +00:00