mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
radv: fix computing the number of color samples if no attachments
When no color attachments, the rasterization samples should be used.
Fixes: 0222dace90 ("radv: Support VK_KHR_dynamic_rendering for pipeline creation.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5830
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14642>
This commit is contained in:
parent
4e4a2d0f97
commit
b8c518f0fb
1 changed files with 1 additions and 1 deletions
|
|
@ -870,7 +870,7 @@ radv_pipeline_color_samples(const VkGraphicsPipelineCreateInfo *pCreateInfo)
|
|||
vk_find_struct_const(pCreateInfo->pNext, ATTACHMENT_SAMPLE_COUNT_INFO_AMD);
|
||||
const VkPipelineRenderingCreateInfoKHR *render_create_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, PIPELINE_RENDERING_CREATE_INFO_KHR);
|
||||
if (sample_info && render_create_info) {
|
||||
if (sample_info && render_create_info && sample_info->colorAttachmentCount > 0) {
|
||||
unsigned samples = 1;
|
||||
for (uint32_t i = 0; i < sample_info->colorAttachmentCount; ++i) {
|
||||
if (render_create_info->pColorAttachmentFormats[i] != VK_FORMAT_UNDEFINED) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue