spirv: Handle XFB variable decorations
These set the new explicit XFB members on nir_variable. This is needed to support ARB_gl_spirv, as Vulkan doesn't support transform feedback. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
a5ec8461f9
commit
cd4a14be06
|
@ -1299,7 +1299,6 @@ apply_var_decoration(struct vtn_builder *b,
|
||||||
case SpvDecorationAliased:
|
case SpvDecorationAliased:
|
||||||
case SpvDecorationUniform:
|
case SpvDecorationUniform:
|
||||||
case SpvDecorationStream:
|
case SpvDecorationStream:
|
||||||
case SpvDecorationOffset:
|
|
||||||
case SpvDecorationLinkageAttributes:
|
case SpvDecorationLinkageAttributes:
|
||||||
break; /* Do nothing with these here */
|
break; /* Do nothing with these here */
|
||||||
|
|
||||||
|
@ -1326,9 +1325,16 @@ apply_var_decoration(struct vtn_builder *b,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SpvDecorationXfbBuffer:
|
case SpvDecorationXfbBuffer:
|
||||||
|
var_data->explicit_xfb_buffer = true;
|
||||||
|
var_data->xfb_buffer = dec->literals[0];
|
||||||
|
break;
|
||||||
case SpvDecorationXfbStride:
|
case SpvDecorationXfbStride:
|
||||||
vtn_warn("Vulkan does not have transform feedback: %s",
|
var_data->explicit_xfb_stride = true;
|
||||||
spirv_decoration_to_string(dec->decoration));
|
var_data->xfb_stride = dec->literals[0];
|
||||||
|
break;
|
||||||
|
case SpvDecorationOffset:
|
||||||
|
var_data->explicit_offset = true;
|
||||||
|
var_data->offset = dec->literals[0];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SpvDecorationCPacked:
|
case SpvDecorationCPacked:
|
||||||
|
|
Loading…
Reference in New Issue