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 */
/* 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,
/* 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];
};