[Mesa-dev] [PATCH 06/21] mesa/compiler: set inputs_read directly in shader_info
Timothy Arceri
timothy.arceri at collabora.com
Thu Oct 20 08:46:56 UTC 2016
---
src/compiler/glsl/ir_set_program_inouts.cpp | 12 ++++++------
src/compiler/shader_info.c | 1 -
src/mesa/main/mtypes.h | 1 -
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp
index e68ecfb..4529b6c 100644
--- a/src/compiler/glsl/ir_set_program_inouts.cpp
+++ b/src/compiler/glsl/ir_set_program_inouts.cpp
@@ -24,13 +24,13 @@
/**
* \file ir_set_program_inouts.cpp
*
- * Sets the InputsRead and OutputsWritten of Mesa programs.
+ * Sets the inputs_read and OutputsWritten of Mesa programs.
*
* Mesa programs (gl_program, not gl_shader_program) have a set of
* flags indicating which varyings are read and written. Computing
* which are actually read from some sort of backend code can be
* tricky when variable array indexing involved. So this pass
- * provides support for setting InputsRead and OutputsWritten right
+ * provides support for setting inputs_read and OutputsWritten right
* from the GLSL IR.
*/
@@ -83,10 +83,10 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
{
/* As of GLSL 1.20, varyings can only be floats, floating-point
* vectors or matrices, or arrays of them. For Mesa programs using
- * InputsRead/OutputsWritten, everything but matrices uses one
+ * inputs_read/OutputsWritten, everything but matrices uses one
* slot, while matrices use a slot per column. Presumably
* something doing a more clever packing would use something other
- * than InputsRead/OutputsWritten.
+ * than inputs_read/OutputsWritten.
*/
for (int i = 0; i < len; i++) {
@@ -113,7 +113,7 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
if (is_patch_generic)
prog->PatchInputsRead |= bitfield;
else
- prog->InputsRead |= bitfield;
+ prog->info.inputs_read |= bitfield;
/* double inputs read is only for vertex inputs */
if (stage == MESA_SHADER_VERTEX &&
@@ -426,7 +426,7 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog,
{
ir_set_program_inouts_visitor v(prog, shader_stage);
- prog->InputsRead = 0;
+ prog->info.inputs_read = 0;
prog->OutputsWritten = 0;
prog->SecondaryOutputsWritten = 0;
prog->OutputsRead = 0;
diff --git a/src/compiler/shader_info.c b/src/compiler/shader_info.c
index 34aaf9f..2d4292e 100644
--- a/src/compiler/shader_info.c
+++ b/src/compiler/shader_info.c
@@ -30,7 +30,6 @@ copy_shader_info(const struct gl_shader_program *shader_prog,
{
shader_info *info = &sh->Program->info;
- info->inputs_read = sh->Program->InputsRead;
info->double_inputs_read = sh->Program->DoubleInputsRead;
info->outputs_written = sh->Program->OutputsWritten;
info->outputs_read = sh->Program->OutputsRead;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 989312b..d31293b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1922,7 +1922,6 @@ struct gl_program
struct shader_info info;
- GLbitfield64 InputsRead; /**< Bitmask of which input regs are read */
GLbitfield64 DoubleInputsRead; /**< Bitmask of which input regs are read and are doubles */
GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */
GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
--
2.7.4
More information about the mesa-dev
mailing list