Skip to content

Commit

Permalink
Update Granite.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Aug 25, 2024
1 parent 2549779 commit a2b0e85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Granite
Submodule Granite updated 42 files
+1 −0 application/CMakeLists.txt
+1 −1 application/application.cpp
+2 −2 application/global/global_managers_init.cpp
+10 −0 application/input/input.cpp
+2 −0 application/input/input.hpp
+5 −5 application/input/input_sdl.cpp
+2 −0 application/platforms/CMakeLists.txt
+1 −1 application/platforms/android/gradle/toplevel.build.gradle
+58 −14 application/platforms/application_android.cpp
+33 −0 application/platforms/application_headless_wrapper.cpp
+18 −16 application/platforms/application_sdl3.cpp
+1 −1 audio/audio_mixer.cpp
+21 −9 filesystem/linux/os_filesystem.cpp
+2 −2 renderer/fft/fft.cpp
+1 −1 renderer/lights/clusterer.cpp
+1 −1 renderer/render_graph.cpp
+2 −2 renderer/scene.cpp
+2 −2 scene-export/meshlet_export.cpp
+1 −1 tests/meshlet_viewer.cpp
+6 −2 third_party/CMakeLists.txt
+1 −1 third_party/fsr2
+1 −1 third_party/sdl3
+0 −16 ui/label.cpp
+4 −0 util/aligned_alloc.hpp
+23 −14 util/bitops.hpp
+24 −0 util/cli_parser.cpp
+1 −1 util/dynamic_library.cpp
+2 −2 util/timer.cpp
+219 −150 vulkan/command_buffer.cpp
+16 −4 vulkan/command_buffer.hpp
+60 −15 vulkan/context.cpp
+5 −1 vulkan/context.hpp
+85 −60 vulkan/descriptor_set.cpp
+24 −21 vulkan/descriptor_set.hpp
+7 −1 vulkan/device.cpp
+1 −0 vulkan/limits.hpp
+1 −1 vulkan/render_pass.hpp
+134 −84 vulkan/shader.cpp
+20 −11 vulkan/shader.hpp
+6 −1 vulkan/vulkan_headers.hpp
+9 −0 vulkan/wsi.cpp
+1 −0 vulkan/wsi.hpp
10 changes: 5 additions & 5 deletions parallel-rdp/rdp_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ static int normalize_dzpix(int dz)
else if (dz == 0)
return 1;

unsigned bit = 31 - leading_zeroes(dz);
unsigned bit = 31 - Util::leading_zeroes(dz);
return 1 << (bit + 1);
}

Expand Down Expand Up @@ -1680,7 +1680,7 @@ void Renderer::submit_span_setup_jobs(Vulkan::CommandBuffer &cmd, bool upscale)
cmd.set_buffer_view(1, 0, *instance.gpu.span_info_jobs_view);
cmd.set_specialization_constant_mask(3);
cmd.set_specialization_constant(0, (upscale ? caps.upscaling : 1) * ImplementationConstants::DefaultWorkgroupSize);
cmd.set_specialization_constant(1, upscale ? trailing_zeroes(caps.upscaling) : 0u);
cmd.set_specialization_constant(1, upscale ? Util::trailing_zeroes(caps.upscaling) : 0u);

Vulkan::QueryPoolHandle begin_ts, end_ts;
if (caps.timestamp >= 2)
Expand Down Expand Up @@ -1780,7 +1780,7 @@ void Renderer::submit_rasterization(Vulkan::CommandBuffer &cmd, Vulkan::Buffer &
if (caps.timestamp >= 2)
start_ts = cmd.write_timestamp(VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT);

uint32_t scale_log2_bit = (upscaling ? trailing_zeroes(caps.upscaling) : 0u) << RASTERIZATION_UPSCALING_LOG2_BIT_OFFSET;
uint32_t scale_log2_bit = (upscaling ? Util::trailing_zeroes(caps.upscaling) : 0u) << RASTERIZATION_UPSCALING_LOG2_BIT_OFFSET;

for (size_t i = 0; i < stream.static_raster_state_cache.size(); i++)
{
Expand Down Expand Up @@ -1891,7 +1891,7 @@ void Renderer::submit_tile_binning_combined(Vulkan::CommandBuffer &cmd, bool ups
if (supports_subgroup_size_control(32, subgroup_size))
{
cmd.enable_subgroup_size_control(true);
cmd.set_subgroup_size_log2(true, 5, trailing_zeroes(subgroup_size));
cmd.set_subgroup_size_log2(true, 5, Util::trailing_zeroes(subgroup_size));
}
}
else
Expand Down Expand Up @@ -2092,7 +2092,7 @@ void Renderer::submit_depth_blend(Vulkan::CommandBuffer &cmd, Vulkan::Buffer &tm
cmd.set_specialization_constant(5, Limits::MaxPrimitives);
cmd.set_specialization_constant(6, upscaled ? caps.max_width : Limits::MaxWidth);
cmd.set_specialization_constant(7, uint32_t(force_write_mask || (!is_host_coherent && !upscaled)) |
((upscaled ? trailing_zeroes(caps.upscaling) : 0u) << 1u));
((upscaled ? Util::trailing_zeroes(caps.upscaling) : 0u) << 1u));

if (upscaled)
cmd.set_storage_buffer(0, 0, *upscaling_multisampled_rdram);
Expand Down
2 changes: 1 addition & 1 deletion parallel-rdp/video_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ Vulkan::ImageHandle VideoInterface::vram_fetch_stage(const Registers &regs, unsi
async_cmd->set_specialization_constant_mask(7);
async_cmd->set_specialization_constant(0, uint32_t(rdram_size));
async_cmd->set_specialization_constant(1, regs.status & (VI_CONTROL_TYPE_MASK | VI_CONTROL_META_AA_BIT));
async_cmd->set_specialization_constant(2, trailing_zeroes(scaling_factor));
async_cmd->set_specialization_constant(2, Util::trailing_zeroes(scaling_factor));

async_cmd->push_constants(&push, 0, sizeof(push));
async_cmd->dispatch((extract_width + 15) / 16,
Expand Down

0 comments on commit a2b0e85

Please sign in to comment.