mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
spirv/nir: Fix the stream ID when emitting a primitive or vertex
It looks like it was previously taking the SPIR-V instruction number directly instead of looking up the constant value. v2: use vtn_constant_value helper (Jason) Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
13b8857fcf
commit
b0af66bb17
1 changed files with 5 additions and 2 deletions
|
|
@ -3218,9 +3218,12 @@ vtn_handle_barrier(struct vtn_builder *b, SpvOp opcode,
|
|||
|
||||
switch (opcode) {
|
||||
case SpvOpEmitStreamVertex:
|
||||
case SpvOpEndStreamPrimitive:
|
||||
nir_intrinsic_set_stream_id(intrin, w[1]);
|
||||
case SpvOpEndStreamPrimitive: {
|
||||
unsigned stream = vtn_constant_value(b, w[1])->values[0].u32[0];
|
||||
nir_intrinsic_set_stream_id(intrin, stream);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue