Halt needs to be always in pair. First halt issued will mask off active
channels and second one will basically re-enable those masked off
channels.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42067>
Using multiple `MTL4Compiler` instances concurrently may result in
the process crashing from within the Metal driver. Work around this
by maintaining one `MTL4Compiler` per `MTLDevice`.
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41842>
Enables using new features that are only available with Metal 4 pipelines,
and fixes Metal validation errors from depth/stencil format mismatches
between pipeline and render pass attachments due to differences in strictness
between Metal and Vulkan.
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41842>
Lowerings like ensuring correct point size outputs, vertex position
output, and clip space control are expected to happen on the shader
stage which becomes the vertex stage on the actual hardware.
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42020>
After LLVM APInt's refactor, stricter checks for
integer signedness are imposed. If a sign extended
uint64_t is passed to LLVMConstInt(...) producing
a value much larger than uintNmax for N < 64,
then LLVM complains.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41822>
Refer changes made to AMDGPU backend of llvm-project
in commit 4b1cfc5d7c606ece125d1e0ef6d13e0289553200
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41822>
Guard external texture lowering by !nir_tex_instr_is_query(), matching
the pattern already used by swizzle_result and lower_srgb.
Fixes textureSize() on samplerExternalOES on panfrost, which triggers
the assertion:
```
Invalid invariant idx.type == BI_INDEX_REGISTER:
r10 = TEX_SINGLE.rgb.2d.f32.zero_lod _.h00, ^r10, ^r11, sr_count:0
```
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41454>
Soon we'll parse the options earlier where we don't target a specific
device yet, so we need to be able to generate the clang arguments on the
fly after parsing.
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
The CString Debug implementation does not handle new lines, so it gets all
printed as a single row, which is not what we want at all.
Fixes: 01de0ff26f ("rusticl/program: store log as a CString")
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
This will save us the trouble of faking constant folding for the BVH level and
trace ray control values when we lower this intrinsic in the new backends.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42006>
Add a script to run whatever you want under drm-shim given only a driver name,
CI job name or GPU model, plus the option to dump assembly with a common option.
This lets people debugging common code easily run shader-db or whatever with
whatever they want without needing to look up a million driver specific
options/paths/etc.
Must run inside a meson devenv. Example usage (path symlinked):
drm-shim --disasm glk ./run shaders/glmark/1-1.shader_test
drm-shim --disasm asahi ./run shaders/glmark/1-1.shader_test
drm-shim --disasm panfrost-t860 ./run shaders/glmark/1-1.shader_test
drm-shim --disasm zink-radv-navi31-valve ./run shaders/glmark/1-1.shader_test
Makes for a fun compilerexplorer like tool too
Reduces amount of docs needed for https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41959
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42055>
We don't use anything from that header. We call
nir_format_pack_r9g9b9e5(), which comes from nir_format_convert.h,
which we already include.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41976>
The key is only used inside that file. Make it like we do with the
keys in blorp_clear.c.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41976>
When you use designated initializers, anything that is not explicitly
set is set to zero. When you do something like:
struct blorp_blit_prog_key {
.base = BLORP_BASE_KEY_INIT(BLORP_SHADER_TYPE_BLIT),
.base.shader_pipeline = BLORP_SHADER_PIPELINE_RENDER,
};
the second initialization is the only one that does something: it sets
shader_pipeline to the desired value, and all the other fields in
"base" are set to 0. This is easily verifiable by just examining the
contents of all the blorp keys we initialize this way: name and
shader_type are always zero.
This means that if two blorp shaders of different types have the
same key size, the shader cache could confuse them. Still, I don't
think this is happening in the real world.
Fixes: 22ecb4a10f ("intel/blorp: Support compute for slow clears")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/11690
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41976>
If we fail to compile a Kernel, don't silently fail: call mesa_loge()
so we can at least know it happened. On debug builds, just assert(),
so if they ever happen in CI, we'll know.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41976>