diff --git a/include/QF/Vulkan/qf_lighting.h b/include/QF/Vulkan/qf_lighting.h index 5abb16e92..24296c9ff 100644 --- a/include/QF/Vulkan/qf_lighting.h +++ b/include/QF/Vulkan/qf_lighting.h @@ -58,7 +58,7 @@ typedef struct qfv_light_buffer_s { #define LIGHTING_BUFFER_INFOS 1 #define LIGHTING_ATTACH_INFOS 5 -#define LIGHTING_SHADOW_INFOS MaxLights +#define LIGHTING_SHADOW_INFOS 32 #define LIGHTING_DESCRIPTORS (LIGHTING_BUFFER_INFOS + LIGHTING_ATTACH_INFOS + 1) typedef struct lightingframe_s { diff --git a/include/QF/Vulkan/qf_matrices.h b/include/QF/Vulkan/qf_matrices.h index c9f57abb3..505bb1fe9 100644 --- a/include/QF/Vulkan/qf_matrices.h +++ b/include/QF/Vulkan/qf_matrices.h @@ -47,11 +47,6 @@ typedef struct qfv_matrix_buffer_s { vec4f_t pad2[3]; } qfv_matrix_buffer_t; -#define LIGHTING_BUFFER_INFOS 1 -#define LIGHTING_ATTACH_INFOS 5 -#define LIGHTING_SHADOW_INFOS MaxLights -#define LIGHTING_DESCRIPTORS (LIGHTING_BUFFER_INFOS + LIGHTING_ATTACH_INFOS + 1) - typedef struct matrixframe_s { //VkCommandBuffer cmd; VkBuffer buffer; diff --git a/libs/video/renderer/vulkan/pl_quake_def.plist b/libs/video/renderer/vulkan/pl_quake_def.plist index 831def819..b4e2c5383 100644 --- a/libs/video/renderer/vulkan/pl_quake_def.plist +++ b/libs/video/renderer/vulkan/pl_quake_def.plist @@ -229,7 +229,7 @@ bindings = ( { type = combined_image_sampler; - descriptorCount = 768;//"$frames.size * size_t($properties.limits.maxSamplers)"; + descriptorCount = "$frames.size * size_t(32)"; }, ); }; @@ -378,7 +378,7 @@ { binding = 0; descriptorType = combined_image_sampler; - descriptorCount = 768;//$properties.limits.maxSamplers; + descriptorCount = 32; stageFlags = fragment; }, ); diff --git a/libs/video/renderer/vulkan/vulkan_lighting.c b/libs/video/renderer/vulkan/vulkan_lighting.c index d37675753..358a4b6c7 100644 --- a/libs/video/renderer/vulkan/vulkan_lighting.c +++ b/libs/video/renderer/vulkan/vulkan_lighting.c @@ -448,9 +448,7 @@ Vulkan_Lighting_Init (vulkan_ctx_t *ctx) lframe->shadowWrite = base_image_write; lframe->shadowWrite.dstSet = shadow_set->a[i]; lframe->shadowWrite.dstBinding = 0; - lframe->shadowWrite.descriptorCount - = min (MaxLights, - device->physDev->properties->limits.maxPerStageDescriptorSamplers); + lframe->shadowWrite.descriptorCount = LIGHTING_SHADOW_INFOS; lframe->shadowWrite.pImageInfo = lframe->shadowInfo; } free (shadow_set);