mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
zink/nir-to-spirv: Make sure sampleid for InterpolateAtSample is int
This fixes the validation error
VUID-VkShaderModuleCreateInfo-pCode-08737
triggered by piglit:
spec@arb_gpu_shader5@execution@built-in-functions@fs-interpolateatsample-block-array:
GLSL.std.450 InterpolateAtSample: expected Sample to be 32-bit integer
%47 = OpExtInst %float %1 InterpolateAtSample %45 %float_0
Fixes: 9f6be8effb
zink: store and use alu types for ntv defs
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28043>
(cherry picked from commit b7d6d90dab)
This commit is contained in:
parent
9ec4e8aa47
commit
79bd37189b
2 changed files with 3 additions and 1 deletions
|
|
@ -424,7 +424,7 @@
|
|||
"description": "zink/nir-to-spirv: Make sure sampleid for InterpolateAtSample is int",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "9f6be8effb43fcd4ce2fd00045bc6244ddf63529",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2739,6 +2739,8 @@ emit_interpolate(struct ntv_context *ctx, nir_intrinsic_instr *intr)
|
|||
case nir_intrinsic_interp_deref_at_sample:
|
||||
op = GLSLstd450InterpolateAtSample;
|
||||
src1 = get_src(ctx, &intr->src[1], &atype);
|
||||
if (atype != nir_type_int)
|
||||
src1 = emit_bitcast(ctx, get_ivec_type(ctx, 32, 1), src1);
|
||||
break;
|
||||
case nir_intrinsic_interp_deref_at_offset:
|
||||
op = GLSLstd450InterpolateAtOffset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue