Mesa (master): i965/gs: Allow primitive id to be a system value
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Fri Nov 11 06:49:55 UTC 2016
Module: Mesa
Branch: master
Commit: a5e88e66e633aaeb587b274d80e21cd46c8ee2cb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a5e88e66e633aaeb587b274d80e21cd46c8ee2cb
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Thu Nov 10 22:36:39 2016 -0800
i965/gs: Allow primitive id to be a system value
This allows for gl_PrimitiveId to come in as a system value rather than as
an input. This is the way it will come in from SPIR-V. We keeps the input
path working for now so we don't break GL.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: "13.0" <mesa-stable at lists.freedesktop.org>
---
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
index 10be41b..2f4306a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
@@ -626,7 +626,8 @@ brw_compile_gs(const struct brw_compiler *compiler, void *log_data,
shader = brw_postprocess_nir(shader, compiler->devinfo, is_scalar);
prog_data->include_primitive_id =
- (shader->info->inputs_read & VARYING_BIT_PRIMITIVE_ID) != 0;
+ (shader->info->inputs_read & VARYING_BIT_PRIMITIVE_ID) ||
+ (shader->info->system_values_read & (1 << SYSTEM_VALUE_PRIMITIVE_ID));
prog_data->invocations = shader->info->gs.invocations;
More information about the mesa-commit
mailing list