mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 09:00:10 +01:00
zink: always set VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT sometimes
some drivers (mostly desktop) are known to ignore this pipeline flag, thus it can be set unconditionally in pipeline state to deduplicate pipeline variants without affecting performance Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18787>
This commit is contained in:
parent
97c7eaf17f
commit
645f2da3fa
3 changed files with 19 additions and 2 deletions
|
|
@ -1786,7 +1786,8 @@ unbind_samplerview(struct zink_context *ctx, gl_shader_stage stage, unsigned slo
|
|||
}
|
||||
ctx->feedback_loops &= ~BITFIELD_BIT(idx);
|
||||
}
|
||||
if (feedback_loops && !ctx->feedback_loops) {
|
||||
if (!zink_screen(ctx->base.screen)->driver_workarounds.always_feedback_loop &&
|
||||
feedback_loops && !ctx->feedback_loops) {
|
||||
/* unset feedback loop bits */
|
||||
if (ctx->gfx_pipeline_state.feedback_loop)
|
||||
ctx->gfx_pipeline_state.dirty = true;
|
||||
|
|
@ -2825,7 +2826,8 @@ unbind_fb_surface(struct zink_context *ctx, struct pipe_surface *surf, unsigned
|
|||
ctx->rp_layout_changed = true;
|
||||
}
|
||||
ctx->feedback_loops &= ~BITFIELD_BIT(idx);
|
||||
if (feedback_loops && !ctx->feedback_loops) {
|
||||
if (!zink_screen(ctx->base.screen)->driver_workarounds.always_feedback_loop &&
|
||||
feedback_loops && !ctx->feedback_loops) {
|
||||
/* unset feedback loop bits */
|
||||
if (ctx->gfx_pipeline_state.feedback_loop)
|
||||
ctx->gfx_pipeline_state.dirty = true;
|
||||
|
|
|
|||
|
|
@ -2267,6 +2267,20 @@ init_driver_workarounds(struct zink_screen *screen)
|
|||
screen->driver_workarounds.z16_unscaled_bias = 1<<15;
|
||||
else
|
||||
screen->driver_workarounds.z16_unscaled_bias = 1<<16;
|
||||
/* these drivers don't use VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, so it can always be set */
|
||||
switch (screen->info.driver_props.driverID) {
|
||||
case VK_DRIVER_ID_MESA_RADV:
|
||||
case VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA:
|
||||
case VK_DRIVER_ID_MESA_LLVMPIPE:
|
||||
case VK_DRIVER_ID_MESA_VENUS:
|
||||
case VK_DRIVER_ID_NVIDIA_PROPRIETARY:
|
||||
case VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS:
|
||||
case VK_DRIVER_ID_IMAGINATION_PROPRIETARY:
|
||||
screen->driver_workarounds.always_feedback_loop = screen->info.have_EXT_attachment_feedback_loop_layout;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static struct zink_screen *
|
||||
|
|
|
|||
|
|
@ -1167,6 +1167,7 @@ struct zink_screen {
|
|||
bool broken_l4a4;
|
||||
bool depth_clip_control_missing;
|
||||
bool implicit_sync;
|
||||
bool always_feedback_loop;
|
||||
bool force_pipeline_library;
|
||||
unsigned z16_unscaled_bias;
|
||||
unsigned z24_unscaled_bias;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue