mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
zink: always allow mutating the format
There's no good way to know if a texture-view will be created, so we just have to accept it for all resources. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Fixes:8d46e35d16("zink: introduce opengl over vulkan") (cherry picked from commitca87a53b46)
This commit is contained in:
parent
2ea5038045
commit
b90f5a9ea0
1 changed files with 3 additions and 2 deletions
|
|
@ -137,6 +137,7 @@ resource_create(struct pipe_screen *pscreen,
|
|||
|
||||
VkImageCreateInfo ici = {};
|
||||
ici.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
|
||||
ici.flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
|
||||
|
||||
switch (templ->target) {
|
||||
case PIPE_TEXTURE_1D:
|
||||
|
|
@ -146,7 +147,7 @@ resource_create(struct pipe_screen *pscreen,
|
|||
|
||||
case PIPE_TEXTURE_CUBE:
|
||||
case PIPE_TEXTURE_CUBE_ARRAY:
|
||||
ici.flags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
|
||||
ici.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
|
||||
/* fall-through */
|
||||
case PIPE_TEXTURE_2D:
|
||||
case PIPE_TEXTURE_2D_ARRAY:
|
||||
|
|
@ -157,7 +158,7 @@ resource_create(struct pipe_screen *pscreen,
|
|||
case PIPE_TEXTURE_3D:
|
||||
ici.imageType = VK_IMAGE_TYPE_3D;
|
||||
if (templ->bind & PIPE_BIND_RENDER_TARGET)
|
||||
ici.flags = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT;
|
||||
ici.flags |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT;
|
||||
break;
|
||||
|
||||
case PIPE_BUFFER:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue