Skip to content

Commit

Permalink
[gpu.pass] increased pass maximum image resource count to 4096
Browse files Browse the repository at this point in the history
  • Loading branch information
harrand committed Oct 30, 2024
1 parent ba85046 commit 7952f2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/tz/gpu/pass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ namespace tz::gpu
* @ingroup tz_gpu_pass
* @brief Add a new image resource to be used in the pass.
* @return @ref tz::error_code::invalid_value If you fail to provide a valid image resource. Note that this excludes buffer resources, the window resource, and the null resource.
* @return @ref tz::error_code::driver_hazard If there are too many images used by the pass already. Passes have an implementation-defined maximum image count that is guaranteed to be at least 1024.
* @return @ref tz::error_code::driver_hazard If there are too many images used by the pass already. Passes have an implementation-defined maximum image count that is guaranteed to be at least 4096.
*
* This will permanently increase the number of resources used in the pass. It is not possible to change the shader used by a pass, so the shader associated with the pass is expected to conditionally use the new image id anyway.
*
Expand Down
4 changes: 2 additions & 2 deletions src/tz/gpu/rhi_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace tz::gpu
VkQueue graphics_compute_queue = VK_NULL_HANDLE;
VkPipelineLayout default_layout = VK_NULL_HANDLE;
constexpr std::uint32_t max_global_image_count = 8192;
constexpr std::uint32_t max_image_count_per_pass = 1024;
constexpr std::uint32_t max_image_count_per_pass = 4096;

VkImage system_image = VK_NULL_HANDLE;
VmaAllocation system_image_mem = VK_NULL_HANDLE;
Expand Down Expand Up @@ -1457,7 +1457,7 @@ namespace tz::gpu

for(resource_handle existing_res : passdata.info.resources)
{
if(existing_res != tz::window_resource && existing_res != tz::nullhand)
if(existing_res != tz::gpu::window_resource && existing_res != tz::nullhand)
{
if(resources[existing_res.peek()].is_image())
{
Expand Down

0 comments on commit 7952f2a

Please sign in to comment.