[dxvk] Use custom spec constant for swap chain blitter

This commit is contained in:
Philip Rebohle 2022-06-30 18:37:51 +02:00
parent 185331df9c
commit 3349f2d80e
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
5 changed files with 6 additions and 4 deletions

View File

@ -211,8 +211,10 @@ namespace dxvk {
ctx->pushConstants(0, sizeof(args), &args);
ctx->setSpecConstant(VK_PIPELINE_BIND_POINT_GRAPHICS, 0, srcView->imageInfo().sampleCount);
ctx->setSpecConstant(VK_PIPELINE_BIND_POINT_GRAPHICS, 1, m_gammaView != nullptr);
ctx->draw(3, 1, 0, 0);
ctx->setSpecConstant(VK_PIPELINE_BIND_POINT_GRAPHICS, 0, 0);
ctx->setSpecConstant(VK_PIPELINE_BIND_POINT_GRAPHICS, 1, 0);
}
void DxvkSwapchainBlitter::resolve(

View File

@ -1,6 +1,6 @@
#version 450
layout(constant_id = 1) const bool s_gamma_bound = true;
layout(constant_id = 1226) const bool s_gamma_bound = false;
layout(binding = 0) uniform sampler2D s_image;
layout(binding = 1) uniform sampler1D s_gamma;

View File

@ -1,6 +1,6 @@
#version 450
layout(constant_id = 1) const bool s_gamma_bound = true;
layout(constant_id = 1226) const bool s_gamma_bound = false;
layout(binding = 0) uniform sampler2D s_image;
layout(binding = 1) uniform sampler1D s_gamma;

View File

@ -1,7 +1,7 @@
#version 450
layout(constant_id = 1) const bool s_gamma_bound = true;
layout(constant_id = 1225) const uint c_samples = 0;
layout(constant_id = 1226) const bool s_gamma_bound = false;
layout(binding = 0) uniform sampler2DMS s_image;
layout(binding = 1) uniform sampler1D s_gamma;

View File

@ -2,8 +2,8 @@
#extension GL_AMD_shader_fragment_mask: enable
layout(constant_id = 1) const bool s_gamma_bound = true;
layout(constant_id = 1225) const uint c_samples = 0;
layout(constant_id = 1226) const bool s_gamma_bound = false;
layout(binding = 0) uniform sampler2DMS s_image;
layout(binding = 1) uniform sampler1D s_gamma;