mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
zink: do not check buffer-format for usage-bits
Buffers are created without a format in Vulkan, and we always pass in R8_UNORM for them in Gallium. It's the view-formats we should have checked, if anything. But that's orthogonal to this. We shoudn't keep checking R8_UNORM capabilities for buffers, all it's going to do is trigger asserts. Fixes:00dc0036b("zink: flatten out buffer creation usage flags codepath") Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11416> (cherry picked from commita8fc38b276)
This commit is contained in:
parent
1151f52ccf
commit
c4e33a4ed7
2 changed files with 3 additions and 8 deletions
|
|
@ -1012,7 +1012,7 @@
|
|||
"description": "zink: do not check buffer-format for usage-bits",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "00dc0036bb6d0c6de1ec3dc395e1d9e63d05ed83"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -226,21 +226,16 @@ create_bci(struct zink_screen *screen, const struct pipe_resource *templ, unsign
|
|||
VK_BUFFER_USAGE_TRANSFER_DST_BIT |
|
||||
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT;
|
||||
|
||||
VkFormatProperties props = screen->format_props[templ->format];
|
||||
|
||||
bci.usage |= VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT |
|
||||
VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT |
|
||||
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT |
|
||||
VK_BUFFER_USAGE_INDEX_BUFFER_BIT |
|
||||
VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT |
|
||||
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT |
|
||||
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT;
|
||||
if (props.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT)
|
||||
bci.usage |= VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
|
||||
|
||||
if (bind & PIPE_BIND_SHADER_IMAGE) {
|
||||
assert(props.bufferFeatures & VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT);
|
||||
if (bind & PIPE_BIND_SHADER_IMAGE)
|
||||
bci.usage |= VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT;
|
||||
}
|
||||
return bci;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue