From 410a555bfb3abde2ed6784bff4f8dafdb10543a4 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 18 Aug 2018 23:39:48 -0700 Subject: [PATCH] iris: move iris_shader_state from ice->shaders.state to ice->state.shaders it's more state related... --- src/gallium/drivers/iris/iris_context.h | 4 ++-- src/gallium/drivers/iris/iris_state.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 71c3f89965b..cfa2d70bf20 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -316,8 +316,6 @@ struct iris_context { struct iris_compiled_shader *prog[MESA_SHADER_STAGES]; struct brw_vue_map *last_vue_map; - struct iris_shader_state state[MESA_SHADER_STAGES]; - struct u_upload_mgr *uploader; struct hash_table *cache; @@ -344,6 +342,8 @@ struct iris_context { /** GenX-specific current state */ struct iris_genx_state *genx; + struct iris_shader_state shaders[MESA_SHADER_STAGES]; + struct iris_state_ref sampler_table[MESA_SHADER_STAGES]; bool need_border_colors; struct iris_sampler_state *samplers[MESA_SHADER_STAGES][IRIS_MAX_TEXTURE_SAMPLERS]; diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index d0df24cf440..ce4b68464ab 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1730,7 +1730,7 @@ iris_set_constant_buffer(struct pipe_context *ctx, struct iris_context *ice = (struct iris_context *) ctx; struct iris_screen *screen = (struct iris_screen *)ctx->screen; gl_shader_stage stage = stage_from_pipe(p_stage); - struct iris_shader_state *shs = &ice->shaders.state[stage]; + struct iris_shader_state *shs = &ice->state.shaders[stage]; struct iris_const_buffer *cbuf = &shs->constbuf[index]; if (input && (input->buffer || input->user_buffer)) { @@ -1788,7 +1788,7 @@ iris_set_shader_buffers(struct pipe_context *ctx, struct iris_context *ice = (struct iris_context *) ctx; struct iris_screen *screen = (struct iris_screen *)ctx->screen; gl_shader_stage stage = stage_from_pipe(p_stage); - struct iris_shader_state *shs = &ice->shaders.state[stage]; + struct iris_shader_state *shs = &ice->state.shaders[stage]; for (unsigned i = 0; i < count; i++) { if (buffers && buffers[i].buffer) { @@ -3030,7 +3030,7 @@ iris_populate_binding_table(struct iris_context *ice, return; const struct shader_info *info = iris_get_shader_info(ice, stage); - struct iris_shader_state *shs = &ice->shaders.state[stage]; + struct iris_shader_state *shs = &ice->state.shaders[stage]; //struct brw_stage_prog_data *prog_data = (void *) shader->prog_data; uint32_t *bt_map = binder->map + binder->bt_offset[stage]; @@ -3146,7 +3146,7 @@ iris_restore_context_saved_bos(struct iris_context *ice, if (clean & (IRIS_DIRTY_CONSTANTS_VS << stage)) continue; - struct iris_shader_state *shs = &ice->shaders.state[stage]; + struct iris_shader_state *shs = &ice->state.shaders[stage]; struct iris_compiled_shader *shader = ice->shaders.prog[stage]; if (!shader) @@ -3326,7 +3326,7 @@ iris_upload_render_state(struct iris_context *ice, if (!(dirty & (IRIS_DIRTY_CONSTANTS_VS << stage))) continue; - struct iris_shader_state *shs = &ice->shaders.state[stage]; + struct iris_shader_state *shs = &ice->state.shaders[stage]; struct iris_compiled_shader *shader = ice->shaders.prog[stage]; if (!shader) -- 2.30.2