mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 18:24:13 +08:00
zink: check for stores and atomics features
These limits depens on feature-bits.
Fixes: 322a3d4fb0
("zink: partially enable SSBO pipe cap")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9803>
This commit is contained in:
parent
215ff8246f
commit
a466c2a783
@ -138,6 +138,8 @@ supported:
|
||||
* ``VkPhysicalDeviceVulkan11Features``:
|
||||
|
||||
* ``shaderDrawParameters``
|
||||
* ``vertexPipelineStoresAndAtomics``
|
||||
* ``fragmentStoresAndAtomics``
|
||||
|
||||
* For Vulkan 1.1 and below:
|
||||
|
||||
|
@ -713,6 +713,24 @@ zink_get_shader_param(struct pipe_screen *pscreen,
|
||||
return 32; /* arbitrary */
|
||||
|
||||
case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
|
||||
switch (shader) {
|
||||
case PIPE_SHADER_VERTEX:
|
||||
case PIPE_SHADER_TESS_CTRL:
|
||||
case PIPE_SHADER_TESS_EVAL:
|
||||
case PIPE_SHADER_GEOMETRY:
|
||||
if (!screen->info.feats.features.vertexPipelineStoresAndAtomics)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case PIPE_SHADER_FRAGMENT:
|
||||
if (!screen->info.feats.features.fragmentStoresAndAtomics)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO: this limitation is dumb, and will need some fixes in mesa */
|
||||
return MIN2(screen->info.props.limits.maxPerStageDescriptorStorageBuffers, PIPE_MAX_SHADER_BUFFERS);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user