mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
zink: fix disabling multiview mesh with shader objects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37623>
This commit is contained in:
parent
3b63317d93
commit
5702234013
2 changed files with 7 additions and 4 deletions
|
|
@ -1474,7 +1474,8 @@ create_gfx_program_separable(struct zink_context *ctx, struct zink_shader **stag
|
|||
prog->is_separable = true;
|
||||
prog->gfx_hash = hash;
|
||||
prog->base.uses_shobj = screen->info.have_EXT_shader_object &&
|
||||
(is_mesh || !stages[MESA_SHADER_VERTEX]->info.view_mask) &&
|
||||
((stages[MESA_SHADER_VERTEX] && !stages[MESA_SHADER_VERTEX]->info.view_mask) ||
|
||||
(stages[MESA_SHADER_MESH] && !stages[MESA_SHADER_MESH]->info.view_mask)) &&
|
||||
!BITSET_TEST(stages[MESA_SHADER_FRAGMENT]->info.system_values_read, SYSTEM_VALUE_SAMPLE_MASK_IN);
|
||||
|
||||
prog->stages_remaining = prog->stages_present = ctx->shader_stages;
|
||||
|
|
@ -2489,7 +2490,8 @@ zink_link_gfx_shader(struct pipe_context *pctx, void **shaders)
|
|||
VKSCR(DestroyPipeline)(screen->dev, pipeline, NULL);
|
||||
} else {
|
||||
if (zink_screen(pctx->screen)->info.have_EXT_shader_object)
|
||||
prog->base.uses_shobj = (!zshaders[MESA_SHADER_VERTEX] || !zshaders[MESA_SHADER_VERTEX]->info.view_mask) &&
|
||||
prog->base.uses_shobj = ((zshaders[MESA_SHADER_VERTEX] && !zshaders[MESA_SHADER_VERTEX]->info.view_mask) ||
|
||||
(zshaders[MESA_SHADER_MESH] && !zshaders[MESA_SHADER_MESH]->info.view_mask)) &&
|
||||
!BITSET_TEST(zshaders[MESA_SHADER_FRAGMENT]->info.system_values_read, SYSTEM_VALUE_SAMPLE_MASK_IN);
|
||||
if (zink_debug & ZINK_DEBUG_NOBGC) {
|
||||
gfx_program_precompile_job(prog, pctx->screen, 0);
|
||||
|
|
|
|||
|
|
@ -454,13 +454,14 @@ ALWAYS_INLINE static bool
|
|||
zink_can_use_shader_objects_mesh(const struct zink_context *ctx)
|
||||
{
|
||||
return
|
||||
ZINK_SHADER_KEY_OPTIMAL_IS_DEFAULT_MESH(ctx->gfx_pipeline_state.optimal_key) &&
|
||||
ZINK_SHADER_KEY_OPTIMAL_IS_DEFAULT_MESH(ctx->gfx_pipeline_state.mesh_optimal_key) &&
|
||||
/* TODO: is sample shading even possible to handle with GPL? */
|
||||
!ctx->gfx_stages[MESA_SHADER_FRAGMENT]->info.fs.uses_sample_shading &&
|
||||
/* TODO: maybe someday shader objects + viewmask */
|
||||
!ctx->gfx_stages[MESA_SHADER_MESH]->info.view_mask &&
|
||||
!ctx->gfx_pipeline_state.force_persample_interp &&
|
||||
!ctx->gfx_pipeline_state.min_samples;
|
||||
!ctx->gfx_pipeline_state.min_samples &&
|
||||
!ctx->fb_state.viewmask;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue