summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_emit.c
diff options
context:
space:
mode:
authorChristian Gmeiner <[email protected]>2017-03-14 22:25:17 +0100
committerChristian Gmeiner <[email protected]>2017-04-05 19:57:59 +0200
commitecc2474e59915bd0bd564ef0d43743432dfe6262 (patch)
tree2f73e930878a8b7c67825ee6615d4ccc1266191b /src/gallium/drivers/etnaviv/etnaviv_emit.c
parent65e9bd2703f2fce29321f3512d4a2673df2556d3 (diff)
etnaviv: add struct etna_shader_state
Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_emit.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_emit.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c
index 8394474b4b5..af74cbb4c52 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_emit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c
@@ -253,8 +253,8 @@ required_stream_size(struct etna_context *ctx)
size += ctx->vertex_elements->num_elements + 1;
/* uniforms - worst case (2 words per uniform load) */
- size += ctx->vs->uniforms.const_count * 2;
- size += ctx->fs->uniforms.const_count * 2;
+ size += ctx->shader.vs->uniforms.const_count * 2;
+ size += ctx->shader.fs->uniforms.const_count * 2;
/* shader */
size += ctx->shader_state.vs_inst_mem_size + 1;
@@ -722,14 +722,14 @@ etna_emit_state(struct etna_context *ctx)
static const uint32_t uniform_dirty_bits =
ETNA_DIRTY_SHADER | ETNA_DIRTY_CONSTBUF;
- if (dirty & (uniform_dirty_bits | ctx->fs->uniforms_dirty_bits))
+ if (dirty & (uniform_dirty_bits | ctx->shader.fs->uniforms_dirty_bits))
etna_uniforms_write(
- ctx, ctx->vs, &ctx->constant_buffer[PIPE_SHADER_VERTEX],
+ ctx, ctx->shader.vs, &ctx->constant_buffer[PIPE_SHADER_VERTEX],
ctx->shader_state.VS_UNIFORMS, &ctx->shader_state.vs_uniforms_size);
- if (dirty & (uniform_dirty_bits | ctx->vs->uniforms_dirty_bits))
+ if (dirty & (uniform_dirty_bits | ctx->shader.vs->uniforms_dirty_bits))
etna_uniforms_write(
- ctx, ctx->fs, &ctx->constant_buffer[PIPE_SHADER_FRAGMENT],
+ ctx, ctx->shader.fs, &ctx->constant_buffer[PIPE_SHADER_FRAGMENT],
ctx->shader_state.PS_UNIFORMS, &ctx->shader_state.ps_uniforms_size);
/**** Large dynamically-sized state ****/
@@ -762,7 +762,7 @@ etna_emit_state(struct etna_context *ctx)
ctx->shader_state.ps_uniforms_size * 4);
} else {
etna_coalesce_start(stream, &coalesce);
- for (int x = 0; x < ctx->vs->uniforms.const_count; ++x) {
+ for (int x = 0; x < ctx->shader.vs->uniforms.const_count; ++x) {
if (ctx->gpu3d.VS_UNIFORMS[x] != ctx->shader_state.VS_UNIFORMS[x]) {
/*05000*/ EMIT_STATE(VS_UNIFORMS(x), ctx->shader_state.VS_UNIFORMS[x]);
ctx->gpu3d.VS_UNIFORMS[x] = ctx->shader_state.VS_UNIFORMS[x];
@@ -771,7 +771,7 @@ etna_emit_state(struct etna_context *ctx)
etna_coalesce_end(stream, &coalesce);
etna_coalesce_start(stream, &coalesce);
- for (int x = 0; x < ctx->fs->uniforms.const_count; ++x) {
+ for (int x = 0; x < ctx->shader.fs->uniforms.const_count; ++x) {
if (ctx->gpu3d.PS_UNIFORMS[x] != ctx->shader_state.PS_UNIFORMS[x]) {
/*07000*/ EMIT_STATE(PS_UNIFORMS(x), ctx->shader_state.PS_UNIFORMS[x]);
ctx->gpu3d.PS_UNIFORMS[x] = ctx->shader_state.PS_UNIFORMS[x];