mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
lavapipe: do not subtract 8 from enum
This seems arbitrary, and makes us check for PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS instead of PIPE_SHADER_CAP_MAX_SHADER_IMAGES, which isn't what we want. The end result is that we accidentally exposed 128 shader images, instead of 16. This can lead to us writing outside of the array of shader images in llvmpipe_set_shader_images, among other bad things. Fixes:b38879f8c5("vallium: initial import of the vulkan frontend") Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10189> (cherry picked from commit83de54f6a6)
This commit is contained in:
parent
f1bbb66c72
commit
5a37a1cd74
2 changed files with 2 additions and 2 deletions
|
|
@ -580,7 +580,7 @@
|
|||
"description": "lavapipe: do not subtract 8 from enum",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "b38879f8c5f57b7f1802e433e33181bdf5e72aef"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ void lvp_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
|
|||
.maxPerStageDescriptorUniformBuffers = pdevice->pscreen->get_shader_param(pdevice->pscreen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_CONST_BUFFERS),
|
||||
.maxPerStageDescriptorStorageBuffers = pdevice->pscreen->get_shader_param(pdevice->pscreen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_SHADER_BUFFERS),
|
||||
.maxPerStageDescriptorSampledImages = pdevice->pscreen->get_shader_param(pdevice->pscreen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS),
|
||||
.maxPerStageDescriptorStorageImages = pdevice->pscreen->get_shader_param(pdevice->pscreen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_SHADER_IMAGES - 8),
|
||||
.maxPerStageDescriptorStorageImages = pdevice->pscreen->get_shader_param(pdevice->pscreen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_SHADER_IMAGES),
|
||||
.maxPerStageDescriptorInputAttachments = 8,
|
||||
.maxPerStageResources = 128,
|
||||
.maxDescriptorSetSamplers = 32 * 1024,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue