spirv: translate cull distance semantic.
authorDave Airlie <airlied@redhat.com>
Mon, 29 Aug 2016 00:18:15 +0000 (10:18 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 4 Oct 2016 00:16:23 +0000 (10:16 +1000)
This just translates to the correct cull distance slot.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/compiler/spirv/vtn_variables.c

index 43bb3bcadf0454eba3b277315488c35283aabc53..44c65ae83eb5305ecd237aa8e8e8af8806a0dd30 100644 (file)
@@ -783,7 +783,7 @@ vtn_get_builtin_location(struct vtn_builder *b,
       *location = VARYING_SLOT_CLIP_DIST0; /* XXX CLIP_DIST1? */
       break;
    case SpvBuiltInCullDistance:
-      /* XXX figure this out */
+      *location = VARYING_SLOT_CULL_DIST0;
       break;
    case SpvBuiltInVertexIndex:
       *location = SYSTEM_VALUE_VERTEX_ID;