summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-12-01 12:15:10 -0800
committerEric Anholt <[email protected]>2019-04-10 11:45:30 -0700
commitafad1f7d625d9402a0f7fe57287d536d7d9b4b5a (patch)
treebe9d359f82ae50816ea1da7529ed3e02995efc33 /src/gallium/drivers/vc4/vc4_context.h
parent0204fb77e0133f9e365bd9d7749984b3421bbed5 (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_context.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index e7cb831774c..f02992f07ee 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -121,25 +121,6 @@ struct vc4_uncompiled_shader {
struct pipe_shader_state base;
};
-struct vc4_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;
-};
-
struct vc4_fs_inputs {
/**
* Array of the meanings of the VPM inputs this shader needs.
@@ -157,9 +138,6 @@ struct vc4_compiled_shader {
struct vc4_shader_uniform_info uniforms;
- struct vc4_ubo_range *ubo_ranges;
- uint32_t num_ubo_ranges;
- uint32_t ubo_size;
/**
* VC4_DIRTY_* flags that, when set in vc4->dirty, mean that the
* uniforms have to be rewritten (and therefore the shader state