summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-10-02 09:50:44 -0700
committerEric Anholt <[email protected]>2014-10-09 21:47:06 +0200
commitc4b0dd53568fa276079f6b6bf7ba4b857ddd65a5 (patch)
tree519caad30e267a0a8d093bed05b91e6aa4419297 /src/gallium/drivers/vc4/vc4_context.h
parent5c72d7706c55d2832b816af4192afa010de51636 (diff)
vc4: Split the coordinate shader to its own vc4_compiled_shader.
Merging VS and CS into the same struct wasn't winning us anything except for not allocating a separate BO (but if we want to pack programs into BOs, we should pack not just those 2 programs together). What it was getting us was a bunch of code duplication about hash table lookups and propagating vc4_compile contents into a vc4_compiled_shader. I was about to make the situation worse with indirect uniform buffer access.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index e8f9e355a98..da07cfa6cb2 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -84,9 +84,7 @@ struct vc4_uncompiled_shader {
struct vc4_compiled_shader {
struct vc4_bo *bo;
- struct vc4_shader_uniform_info uniforms[2];
-
- uint32_t coord_shader_offset;
+ struct vc4_shader_uniform_info uniforms;
/** bitmask of which inputs are color inputs, for flat shade handling. */
uint32_t color_inputs;
@@ -96,7 +94,7 @@ struct vc4_compiled_shader {
struct vc4_program_stateobj {
struct vc4_uncompiled_shader *bind_vs, *bind_fs;
- struct vc4_compiled_shader *vs, *fs;
+ struct vc4_compiled_shader *cs, *vs, *fs;
uint32_t dirty;
uint8_t num_exports;
/* Indexed by semantic name or TGSI_SEMANTIC_COUNT + semantic index
@@ -257,8 +255,7 @@ int vc4_simulator_flush(struct vc4_context *vc4,
void vc4_write_uniforms(struct vc4_context *vc4,
struct vc4_compiled_shader *shader,
struct vc4_constbuf_stateobj *cb,
- struct vc4_texture_stateobj *texstate,
- int shader_index);
+ struct vc4_texture_stateobj *texstate);
void vc4_flush(struct pipe_context *pctx);
void vc4_flush_for_bo(struct pipe_context *pctx, struct vc4_bo *bo);