diff options
author | Eric Anholt <[email protected]> | 2016-12-01 12:15:10 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-04-10 11:45:30 -0700 |
commit | afad1f7d625d9402a0f7fe57287d536d7d9b4b5a (patch) | |
tree | be9d359f82ae50816ea1da7529ed3e02995efc33 /src/gallium/drivers/vc4/vc4_qir.h | |
parent | 0204fb77e0133f9e365bd9d7749984b3421bbed5 (diff) |
vc4: Upload CS/VS UBO uniforms together.
Same as I did for V3D, drop all this code trying to GC the
non-indirectly-loaded uniforms from the UBO that's used for indirect
access of gallium cb[0]. While it does successfully drop some of those,
it came at the cost of uploading the VS's indirect unifroms twice, for the
bin and render versions of the shader.
With the UBO loads simplified, I was also able to easily backport V3D's
change to pack a UBO offset into the uniform_data[] field so that we don't
need to do the add of the uniform base in the shader.
As a bonus, now vc4 doesn't depend on mesa/st type_size functions.
total uniforms in shared programs: 25514 -> 25490 (-0.09%)
total instructions in shared programs: 77019 -> 76836 (-0.24%)
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qir.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h index 17a0d0febc0..4d8bf60cf44 100644 --- a/src/gallium/drivers/vc4/vc4_qir.h +++ b/src/gallium/drivers/vc4/vc4_qir.h @@ -300,31 +300,6 @@ struct vc4_varying_slot { uint8_t swizzle; }; -struct vc4_compiler_ubo_range { - /** - * offset in bytes from the start of the ubo where this range is - * uploaded. - * - * Only set once used is set. - */ - uint32_t dst_offset; - - /** - * offset in bytes from the start of the gallium uniforms where the - * data comes from. - */ - uint32_t src_offset; - - /** size in bytes of this ubo range */ - uint32_t size; - - /** - * Set if this range is used by the shader for indirect uniforms - * access. - */ - bool used; -}; - struct vc4_key { struct vc4_uncompiled_shader *shader_state; struct { @@ -441,14 +416,6 @@ struct vc4_compile { uint32_t outputs_array_size; uint32_t uniforms_array_size; - struct vc4_compiler_ubo_range *ubo_ranges; - uint32_t ubo_ranges_array_size; - /** Number of uniform areas declared in ubo_ranges. */ - uint32_t num_uniform_ranges; - /** Number of uniform areas used for indirect addressed loads. */ - uint32_t num_ubo_ranges; - uint32_t next_ubo_dst_offset; - /* State for whether we're executing on each channel currently. 0 if * yes, otherwise a block number + 1 that the channel jumped to. */ |