iris: Skip repeated depth buffer disables.
Often times, the depth buffer is entirely disabled, but color render targets change. For example, GenerateMipmaps will change the color render target for each miplevel, but there is no depth buffer. In the Civilization VI benchmark, this drops the median number of 3DSTATE_DEPTH_BUFFER etc. packets emitted per frame from 472 to 34.
This commit is contained in:
parent
665989d98b
commit
3a22a8bf49
|
@ -2336,6 +2336,10 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
|
|||
ice->state.dirty |= IRIS_DIRTY_SF_CL_VIEWPORT;
|
||||
}
|
||||
|
||||
if (cso->zsbuf || state->zsbuf) {
|
||||
ice->state.dirty |= IRIS_DIRTY_DEPTH_BUFFER;
|
||||
}
|
||||
|
||||
util_copy_framebuffer_state(cso, state);
|
||||
cso->samples = samples;
|
||||
cso->layers = layers;
|
||||
|
@ -2401,8 +2405,6 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
|
|||
ice->state.null_fb.offset +=
|
||||
iris_bo_offset_from_base_address(iris_resource_bo(ice->state.null_fb.res));
|
||||
|
||||
ice->state.dirty |= IRIS_DIRTY_DEPTH_BUFFER;
|
||||
|
||||
/* Render target change */
|
||||
ice->state.dirty |= IRIS_DIRTY_BINDINGS_FS;
|
||||
|
||||
|
|
Loading…
Reference in New Issue