[PATCH] etnaviv: shrink struct etna_3d_state
Christian Gmeiner
christian.gmeiner at gmail.com
Wed Mar 27 13:58:16 UTC 2019
Drop struct members which are only written to but never read from.
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
src/gallium/drivers/etnaviv/etnaviv_emit.c | 17 -----------------
src/gallium/drivers/etnaviv/etnaviv_internal.h | 6 ------
2 files changed, 23 deletions(-)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c
index f788896dd8..ed7b7ee3cb 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_emit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c
@@ -250,21 +250,6 @@ etna_emit_state(struct etna_context *ctx)
etna_set_state(stream, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
}
- /* If MULTI_SAMPLE_CONFIG.MSAA_SAMPLES changed, clobber affected shader
- * state to make sure it is always rewritten. */
- if (unlikely(dirty & (ETNA_DIRTY_FRAMEBUFFER))) {
- if ((ctx->gpu3d.GL_MULTI_SAMPLE_CONFIG & VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES__MASK) !=
- (ctx->framebuffer.GL_MULTI_SAMPLE_CONFIG & VIVS_GL_MULTI_SAMPLE_CONFIG_MSAA_SAMPLES__MASK)) {
- /* XXX what does the GPU set these states to on MSAA samples change?
- * Does it do the right thing?
- * (increase/decrease as necessary) or something else? Just set some
- * invalid value until we know for
- * sure. */
- ctx->gpu3d.PS_INPUT_COUNT = 0xffffffff;
- ctx->gpu3d.PS_TEMP_REGISTER_CONTROL = 0xffffffff;
- }
- }
-
/* Update vertex elements. This is different from any of the other states, in that
* a) the number of vertex elements written matters: so write only active ones
* b) the vertex element states must all be written: do not skip entries that stay the same */
@@ -693,8 +678,6 @@ etna_emit_state(struct etna_context *ctx)
/* Copy uniforms to gpu3d, so that incremental updates to uniforms are
* possible as long as the
* same shader remains bound */
- ctx->gpu3d.vs_uniforms_size = ctx->shader_state.vs_uniforms_size;
- ctx->gpu3d.ps_uniforms_size = ctx->shader_state.ps_uniforms_size;
memcpy(ctx->gpu3d.VS_UNIFORMS, ctx->shader_state.VS_UNIFORMS,
ctx->shader_state.vs_uniforms_size * 4);
memcpy(ctx->gpu3d.PS_UNIFORMS, ctx->shader_state.PS_UNIFORMS,
diff --git a/src/gallium/drivers/etnaviv/etnaviv_internal.h b/src/gallium/drivers/etnaviv/etnaviv_internal.h
index 77214d9ccb..29566dbd5e 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_internal.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_internal.h
@@ -270,12 +270,6 @@ struct compiled_shader_state {
/* state of some 3d and common registers relevant to etna driver */
struct etna_3d_state {
- unsigned vs_uniforms_size;
- unsigned ps_uniforms_size;
-
- uint32_t /*01008*/ PS_INPUT_COUNT;
- uint32_t /*0100C*/ PS_TEMP_REGISTER_CONTROL;
- uint32_t /*03818*/ GL_MULTI_SAMPLE_CONFIG;
uint32_t /*05000*/ VS_UNIFORMS[VIVS_VS_UNIFORMS__LEN];
uint32_t /*07000*/ PS_UNIFORMS[VIVS_PS_UNIFORMS__LEN];
};
--
2.20.1
More information about the etnaviv
mailing list