Module: Mesa
Branch: master
Commit: cd4a14be063957964ae54e0e828174b9e40961e0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd4a14be063957964ae54e0e828174b9e40961e0

Author: Neil Roberts <[email protected]>
Date:   Tue Dec 12 17:22:49 2017 +0100

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 <[email protected]>

---

 src/compiler/spirv/vtn_variables.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/compiler/spirv/vtn_variables.c 
b/src/compiler/spirv/vtn_variables.c
index fbfea6f8ce..6ff2e83515 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1299,7 +1299,6 @@ apply_var_decoration(struct vtn_builder *b,
    case SpvDecorationAliased:
    case SpvDecorationUniform:
    case SpvDecorationStream:
-   case SpvDecorationOffset:
    case SpvDecorationLinkageAttributes:
       break; /* Do nothing with these here */
 
@@ -1326,9 +1325,16 @@ apply_var_decoration(struct vtn_builder *b,
       break;
 
    case SpvDecorationXfbBuffer:
+      var_data->explicit_xfb_buffer = true;
+      var_data->xfb_buffer = dec->literals[0];
+      break;
    case SpvDecorationXfbStride:
-      vtn_warn("Vulkan does not have transform feedback: %s",
-               spirv_decoration_to_string(dec->decoration));
+      var_data->explicit_xfb_stride = true;
+      var_data->xfb_stride = dec->literals[0];
+      break;
+   case SpvDecorationOffset:
+      var_data->explicit_offset = true;
+      var_data->offset = dec->literals[0];
       break;
 
    case SpvDecorationCPacked:

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to