Use variable shading rate if supported by headset

This commit is contained in:
Patrick Nicolas
2025-08-21 20:46:49 +02:00
parent b5e5586ef6
commit 4a2c83a70d
4 changed files with 107 additions and 1 deletions
+9
View File
@@ -41,6 +41,13 @@ class stream_reprojection
vk::raii::RenderPass renderpass = nullptr;
vk::raii::Pipeline pipeline = nullptr;
// Allowed sizes for variable shading rate
// indices are for x, y
// 0 is 1 pixel
// 1 is 2 or 3 pixels
// 2 is 4 pixels or more
int32_t fragment_sizes[3][3] = {};
// Source image
vk::raii::Sampler sampler = nullptr;
std::vector<vk::raii::ImageView> input_image_views;
@@ -56,6 +63,8 @@ class stream_reprojection
void ensure_vertices(size_t num_vertices);
vertex * get_vertices(size_t view);
int32_t shading_rate(int pixels_x, int pixels_y);
public:
stream_reprojection(
vk::raii::Device & device,