[virglrenderer-devel] [PATCH 09/12] arb_gpu_shader5: add support for prim id and samplemask
Dave Airlie
airlied at gmail.com
Tue May 15 04:38:07 UTC 2018
From: Dave Airlie <airlied at redhat.com>
---
src/vrend_shader.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/vrend_shader.c b/src/vrend_shader.c
index 2161766..56b1bbb 100644
--- a/src/vrend_shader.c
+++ b/src/vrend_shader.c
@@ -714,6 +714,14 @@ iter_declaration(struct tgsi_iterate_context *iter,
name_prefix = "gl_InvocationID";
ctx->has_ints = true;
ctx->uses_gpu_shader5 = true;
+ } else if (decl->Semantic.Name == TGSI_SEMANTIC_SAMPLEMASK) {
+ name_prefix = "gl_SampleMaskIn[0]";
+ ctx->has_ints = true;
+ ctx->uses_gpu_shader5 = true;
+ } else if (decl->Semantic.Name == TGSI_SEMANTIC_PRIMID) {
+ name_prefix = "gl_PrimitiveID";
+ ctx->has_ints = true;
+ ctx->uses_gpu_shader5 = true;
} else {
fprintf(stderr, "unsupported system value %d\n", decl->Semantic.Name);
name_prefix = "unknown";
--
2.14.3
More information about the virglrenderer-devel
mailing list