On Fri, Jul 20, 2018 at 8:09 AM Alejandro Piñeiro <[email protected]> wrote:
> From: Neil Roberts <[email protected]> > > It looks like it was previously taking the SPIR-V instruction number > directly instead of looking up the constant value. > --- > src/compiler/spirv/spirv_to_nir.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/src/compiler/spirv/spirv_to_nir.c > b/src/compiler/spirv/spirv_to_nir.c > index 4d297e60b60..2fef6b0bf15 100644 > --- a/src/compiler/spirv/spirv_to_nir.c > +++ b/src/compiler/spirv/spirv_to_nir.c > @@ -3219,9 +3219,14 @@ 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: { > + struct vtn_value *stream_value = > + vtn_value(b, w[1], vtn_value_type_constant); > + unsigned stream = stream_value->constant->values[0].u32[0]; > There's a vtn_constant_value helper now which would make this a bit shorter. It may not have existed when Neil first drafted this patch. With that update, Reviewed-by: Jason Ekstrand <[email protected]> > + nir_intrinsic_set_stream_id(intrin, stream); > break; > + } > + > default: > break; > } > -- > 2.14.1 > > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
