iris: Skip input resolve handling if bindings haven't changed
This brings the drawoverhead 16 Tex w/ no state change score from 22% of baseline to 97% of baseline.
This commit is contained in:
parent
a342f2deb1
commit
1d05d24b1d
|
@ -792,8 +792,8 @@ void iris_resolve_conditional_render(struct iris_context *ice);
|
||||||
|
|
||||||
void iris_predraw_resolve_inputs(struct iris_context *ice,
|
void iris_predraw_resolve_inputs(struct iris_context *ice,
|
||||||
struct iris_batch *batch,
|
struct iris_batch *batch,
|
||||||
struct iris_shader_state *shs,
|
|
||||||
bool *draw_aux_buffer_disabled,
|
bool *draw_aux_buffer_disabled,
|
||||||
|
gl_shader_stage stage,
|
||||||
bool consider_framebuffer);
|
bool consider_framebuffer);
|
||||||
void iris_predraw_resolve_framebuffer(struct iris_context *ice,
|
void iris_predraw_resolve_framebuffer(struct iris_context *ice,
|
||||||
struct iris_batch *batch,
|
struct iris_batch *batch,
|
||||||
|
|
|
@ -135,9 +135,10 @@ iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
|
||||||
|
|
||||||
bool draw_aux_buffer_disabled[BRW_MAX_DRAW_BUFFERS] = { };
|
bool draw_aux_buffer_disabled[BRW_MAX_DRAW_BUFFERS] = { };
|
||||||
for (gl_shader_stage stage = 0; stage < MESA_SHADER_COMPUTE; stage++) {
|
for (gl_shader_stage stage = 0; stage < MESA_SHADER_COMPUTE; stage++) {
|
||||||
if (ice->shaders.prog[stage])
|
if (ice->shaders.prog[stage]) {
|
||||||
iris_predraw_resolve_inputs(ice,batch, &ice->state.shaders[stage],
|
iris_predraw_resolve_inputs(ice, batch, draw_aux_buffer_disabled,
|
||||||
draw_aux_buffer_disabled, true);
|
stage, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
iris_predraw_resolve_framebuffer(ice, batch, draw_aux_buffer_disabled);
|
iris_predraw_resolve_framebuffer(ice, batch, draw_aux_buffer_disabled);
|
||||||
|
|
||||||
|
@ -214,9 +215,8 @@ iris_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info *grid)
|
||||||
/* We can't do resolves on the compute engine, so awkwardly, we have to
|
/* We can't do resolves on the compute engine, so awkwardly, we have to
|
||||||
* do them on the render batch...
|
* do them on the render batch...
|
||||||
*/
|
*/
|
||||||
iris_predraw_resolve_inputs(ice, &ice->batches[IRIS_BATCH_RENDER],
|
iris_predraw_resolve_inputs(ice, &ice->batches[IRIS_BATCH_RENDER], NULL,
|
||||||
&ice->state.shaders[MESA_SHADER_COMPUTE],
|
MESA_SHADER_COMPUTE, false);
|
||||||
NULL, false);
|
|
||||||
|
|
||||||
iris_batch_maybe_flush(batch, 1500);
|
iris_batch_maybe_flush(batch, 1500);
|
||||||
|
|
||||||
|
|
|
@ -149,12 +149,21 @@ resolve_image_views(struct iris_context *ice,
|
||||||
void
|
void
|
||||||
iris_predraw_resolve_inputs(struct iris_context *ice,
|
iris_predraw_resolve_inputs(struct iris_context *ice,
|
||||||
struct iris_batch *batch,
|
struct iris_batch *batch,
|
||||||
struct iris_shader_state *shs,
|
|
||||||
bool *draw_aux_buffer_disabled,
|
bool *draw_aux_buffer_disabled,
|
||||||
|
gl_shader_stage stage,
|
||||||
bool consider_framebuffer)
|
bool consider_framebuffer)
|
||||||
{
|
{
|
||||||
resolve_sampler_views(ice, batch, shs, draw_aux_buffer_disabled, consider_framebuffer);
|
struct iris_shader_state *shs = &ice->state.shaders[stage];
|
||||||
resolve_image_views(ice, batch, shs, draw_aux_buffer_disabled, consider_framebuffer);
|
|
||||||
|
uint64_t dirty = (IRIS_DIRTY_BINDINGS_VS << stage) |
|
||||||
|
(consider_framebuffer ? IRIS_DIRTY_BINDINGS_FS : 0);
|
||||||
|
|
||||||
|
if (ice->state.dirty & dirty) {
|
||||||
|
resolve_sampler_views(ice, batch, shs, draw_aux_buffer_disabled,
|
||||||
|
consider_framebuffer);
|
||||||
|
resolve_image_views(ice, batch, shs, draw_aux_buffer_disabled,
|
||||||
|
consider_framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
// XXX: ASTC hacks
|
// XXX: ASTC hacks
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue