mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
zink: fix format support detection for storage texel buffers and shader images
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788>
This commit is contained in:
parent
b741e270cd
commit
cde60ab179
1 changed files with 12 additions and 0 deletions
|
|
@ -846,6 +846,14 @@ zink_is_format_supported(struct pipe_screen *pscreen,
|
|||
if (bind & PIPE_BIND_VERTEX_BUFFER &&
|
||||
!(props.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT))
|
||||
return false;
|
||||
|
||||
if (bind & PIPE_BIND_SAMPLER_VIEW &&
|
||||
!(props.bufferFeatures & VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT))
|
||||
return false;
|
||||
|
||||
if (bind & PIPE_BIND_SHADER_IMAGE &&
|
||||
!(props.bufferFeatures & VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT))
|
||||
return false;
|
||||
} else {
|
||||
/* all other targets are texture-targets */
|
||||
if (bind & PIPE_BIND_RENDER_TARGET &&
|
||||
|
|
@ -871,6 +879,10 @@ zink_is_format_supported(struct pipe_screen *pscreen,
|
|||
if (bind & PIPE_BIND_DEPTH_STENCIL &&
|
||||
!(props.optimalTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT))
|
||||
return false;
|
||||
|
||||
if (bind & PIPE_BIND_SHADER_IMAGE &&
|
||||
!(props.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (util_format_is_compressed(format)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue