diff options
author | Eric Anholt <[email protected]> | 2014-10-13 08:24:57 +0100 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-10-13 13:23:48 +0100 |
commit | 5d72a1c95662109b1338605da83329dd25e00859 (patch) | |
tree | b129986448bded3bc8f79c2f735c13aefb96b44a /src/gallium/drivers/vc4/vc4_context.h | |
parent | d561a42bc1fb2d2bd090630d50ff4030aebd518e (diff) |
vc4: Match VS outputs to FS inputs.
If the VS doesn't output a value that the FS needs, we still need to read
the right contents for the remaining FS inputs, by emitting padding. And
if the VS outputs something the FS doesn't need, we shouldn't put it in
the VPM at all (so the code producing it can get DCEed).
Fixes 77 piglit tests.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.h')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_context.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h index 31dec046860..56cfc7b51fa 100644 --- a/src/gallium/drivers/vc4/vc4_context.h +++ b/src/gallium/drivers/vc4/vc4_context.h @@ -83,6 +83,7 @@ struct vc4_uncompiled_shader { }; struct vc4_compiled_shader { + uint64_t program_id; struct vc4_bo *bo; struct vc4_shader_uniform_info uniforms; @@ -91,6 +92,14 @@ struct vc4_compiled_shader { uint32_t color_inputs; uint8_t num_inputs; + + /** + * Array of the meanings of the VPM inputs this shader needs. + * + * It doesn't include those that aren't part of the VPM, like + * point/line coordinates. + */ + struct vc4_varying_semantic *input_semantics; }; struct vc4_program_stateobj { @@ -173,6 +182,7 @@ struct vc4_context { struct primconvert_context *primconvert; struct util_hash_table *fs_cache, *vs_cache; + uint64_t next_compiled_program_id; struct ra_regs *regs; unsigned int reg_class_any; |