File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/main/java/net/vulkanmod/vulkan/shader Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -242,17 +242,21 @@ private void createDescriptorPool(MemoryStack stack) {
242242
243243 VkDescriptorPoolSize .Buffer poolSizes = VkDescriptorPoolSize .calloc (size , stack );
244244
245- int i ;
246- for (i = 0 ; i < pipeline .buffers . size (); ++ i ) {
245+ int i = 0 ;
246+ for (var buffer : pipeline .getBuffers () ) {
247247 VkDescriptorPoolSize uniformBufferPoolSize = poolSizes .get (i );
248- uniformBufferPoolSize .type (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC );
248+ uniformBufferPoolSize .type (buffer . getType () );
249249 uniformBufferPoolSize .descriptorCount (this .poolSize );
250+
251+ ++i ;
250252 }
251253
252- for (; i < pipeline .buffers . size () + pipeline . imageDescriptors . size (); ++ i ) {
254+ for (var imageDescriptor : pipeline .getImageDescriptors () ) {
253255 VkDescriptorPoolSize textureSamplerPoolSize = poolSizes .get (i );
254- textureSamplerPoolSize .type (VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER );
256+ textureSamplerPoolSize .type (imageDescriptor . getType () );
255257 textureSamplerPoolSize .descriptorCount (this .poolSize );
258+
259+ ++i ;
256260 }
257261
258262 VkDescriptorPoolCreateInfo poolInfo = VkDescriptorPoolCreateInfo .calloc (stack );
You can’t perform that action at this time.
0 commit comments