mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 01:40:14 +01:00
zink: check format compatibility up front when creating framebuffer surface
this avoids an assert in create_ivci while enforcing correct behavior cc: mesa-stable Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18446>
This commit is contained in:
parent
4c5dee6c22
commit
758c559bc4
1 changed files with 3 additions and 0 deletions
|
|
@ -263,6 +263,9 @@ zink_create_surface(struct pipe_context *pctx,
|
|||
/* mutable not set by default */
|
||||
zink_resource_object_init_mutable(zink_context(pctx), res);
|
||||
|
||||
if (!zink_get_format(zink_screen(pctx->screen), templ->format))
|
||||
return NULL;
|
||||
|
||||
VkImageViewCreateInfo ivci = create_ivci(zink_screen(pctx->screen), res, templ,
|
||||
pres->target == PIPE_TEXTURE_3D ? target_2d[is_array] : pres->target);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue