Skip to content

Commit

Permalink
Use max textures value
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjglgamedev committed Nov 26, 2023
1 parent d74355d commit 2af8f85
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void createDescriptorPool() {
EngineProperties engineProps = EngineProperties.getInstance();
List<DescriptorPool.DescriptorTypeCount> descriptorTypeCounts = new ArrayList<>();
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(swapChain.getNumImages() + 1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxMaterials() * 3, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxTextures(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
descriptorPool = new DescriptorPool(device, descriptorTypeCounts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void createDescriptorPool(int numImages) {
EngineProperties engineProps = EngineProperties.getInstance();
List<DescriptorPool.DescriptorTypeCount> descriptorTypeCounts = new ArrayList<>();
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(numImages, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxMaterials(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxTextures(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorPool = new DescriptorPool(device, descriptorTypeCounts);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void createDescriptorPool() {
EngineProperties engineProps = EngineProperties.getInstance();
List<DescriptorPool.DescriptorTypeCount> descriptorTypeCounts = new ArrayList<>();
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(swapChain.getNumImages() + 1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxMaterials() * 3, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxTextures(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
descriptorPool = new DescriptorPool(device, descriptorTypeCounts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void createDescriptorPool(int numImages) {
EngineProperties engineProps = EngineProperties.getInstance();
List<DescriptorPool.DescriptorTypeCount> descriptorTypeCounts = new ArrayList<>();
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(numImages, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxMaterials(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxTextures(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorPool = new DescriptorPool(device, descriptorTypeCounts);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void createDescriptorPool() {
EngineProperties engineProps = EngineProperties.getInstance();
List<DescriptorPool.DescriptorTypeCount> descriptorTypeCounts = new ArrayList<>();
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(swapChain.getNumImages() + 1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxMaterials() * 3, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxTextures(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
descriptorPool = new DescriptorPool(device, descriptorTypeCounts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void createDescriptorPool(int numImages) {
EngineProperties engineProps = EngineProperties.getInstance();
List<DescriptorPool.DescriptorTypeCount> descriptorTypeCounts = new ArrayList<>();
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(numImages, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxMaterials(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxTextures(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorPool = new DescriptorPool(device, descriptorTypeCounts);
}

Expand Down
1 change: 0 additions & 1 deletion booksamples/chapter-16/src/main/resources/eng.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ maxIndicesBuffer=5000000
maxJointMatricesBuffer=20000000
maxJointsMatricesLists=150
maxMaterials=500
maxStorageBuffers=100
shadowPcf=true
shadowBias=0.0005
shadowMapSize=4096
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void createDescriptorPool() {
EngineProperties engineProps = EngineProperties.getInstance();
List<DescriptorPool.DescriptorTypeCount> descriptorTypeCounts = new ArrayList<>();
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(swapChain.getNumImages() + 1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxMaterials() * 3, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxTextures(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER));
descriptorPool = new DescriptorPool(device, descriptorTypeCounts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void createDescriptorPool(int numImages) {
EngineProperties engineProps = EngineProperties.getInstance();
List<DescriptorPool.DescriptorTypeCount> descriptorTypeCounts = new ArrayList<>();
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(numImages, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxMaterials(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorTypeCounts.add(new DescriptorPool.DescriptorTypeCount(engineProps.getMaxTextures(), VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER));
descriptorPool = new DescriptorPool(device, descriptorTypeCounts);
}

Expand Down

0 comments on commit 2af8f85

Please sign in to comment.