diff options
author | Timothy Arceri <[email protected]> | 2016-10-20 14:24:03 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-10-26 14:29:36 +1100 |
commit | e81aaeba37f5419323d8f88bc10943c77e25ed14 (patch) | |
tree | 3dc9c65fd0984128fb559aa71ed4ae4c7493995e /src/compiler | |
parent | dfcbdba47119de6c1d81a869f8625bcc3d7560a2 (diff) |
r200/i915/st/mesa/compiler: use common inputs read field
And set set inputs_read directly in shader_info.
To avoid regressions between changes this change is a squashed
version of the following patches.
st/mesa changes where:
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/ir_set_program_inouts.cpp | 12 | ||||
-rw-r--r-- | src/compiler/shader_info.c | 1 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp index e68ecfb11cd..4529b6c3cd5 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 34aaf9f21fd..2d4292e0a4d 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; |