1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[d3d11] Remove explicit spec constant for gamma texture

No longer needed.
This commit is contained in:
Philip Rebohle 2021-02-21 02:20:14 +01:00
parent 7168cc160f
commit 5d4d32c613
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 2 additions and 5 deletions

View File

@ -348,10 +348,7 @@ namespace dxvk {
m_context->bindResourceView(BindingIds::Image, m_swapImageView, nullptr);
m_context->bindResourceView(BindingIds::Gamma, m_gammaTextureView, nullptr);
m_context->setSpecConstant(VK_PIPELINE_BIND_POINT_GRAPHICS, 0, m_gammaTextureView != nullptr);
m_context->draw(3, 1, 0, 0);
m_context->setSpecConstant(VK_PIPELINE_BIND_POINT_GRAPHICS, 0, 0);
if (m_hud != nullptr)
m_hud->render(m_context, info.format, info.imageExtent);

View File

@ -1,6 +1,6 @@
#version 450
layout(constant_id = 1225) const bool c_has_gamma = false;
layout(constant_id = 1) const bool s_gamma_bound = true;
layout(binding = 0) uniform sampler2D s_image;
layout(binding = 1) uniform sampler1D s_gamma;
@ -11,7 +11,7 @@ layout(location = 0) out vec4 o_color;
void main() {
o_color = texture(s_image, i_texcoord);
if (c_has_gamma) {
if (s_gamma_bound) {
o_color = vec4(
texture(s_gamma, o_color.r).r,
texture(s_gamma, o_color.g).g,