From 186dc293841568e9e3fd192122978a5f4c1b22e5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 30 Jun 2022 18:04:58 +0200 Subject: [PATCH] [d3d9] Remove bound spec constants from fixed-function shaders Texture stages are disabled anyway when textures are unbound, so we will never hit the unbound case. --- src/d3d9/d3d9_fixed_function.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/d3d9/d3d9_fixed_function.cpp b/src/d3d9/d3d9_fixed_function.cpp index 51ab3b3c4..62073c6a8 100644 --- a/src/d3d9/d3d9_fixed_function.cpp +++ b/src/d3d9/d3d9_fixed_function.cpp @@ -540,7 +540,6 @@ namespace dxvk { uint32_t texcoordCnt; uint32_t typeId; uint32_t varId; - uint32_t bound; } samplers[8]; struct { @@ -1657,12 +1656,6 @@ namespace dxvk { texture = m_module.opVectorTimesScalar(m_vec4Type, texture, scale); } - - uint32_t bool_t = m_module.defBoolType(); - uint32_t bvec4_t = m_module.defVectorType(bool_t, 4); - std::array boundIndices = { m_ps.samplers[i].bound, m_ps.samplers[i].bound, m_ps.samplers[i].bound, m_ps.samplers[i].bound }; - uint32_t bound4 = m_module.opCompositeConstruct(bvec4_t, boundIndices.size(), boundIndices.data()); - texture = m_module.opSelect(m_vec4Type, bound4, texture, m_module.constvec4f32(0.0f, 0.0f, 0.0f, 1.0f)); } processedTexture = true; @@ -2093,11 +2086,6 @@ namespace dxvk { const uint32_t bindingId = computeResourceSlotId(DxsoProgramType::PixelShader, DxsoBindingType::Image, i); - sampler.bound = m_module.specConstBool(true); - m_module.decorateSpecId(sampler.bound, bindingId); - m_module.setDebugName(sampler.bound, - str::format("s", i, "_bound").c_str()); - m_module.decorateDescriptorSet(sampler.varId, 0); m_module.decorateBinding(sampler.varId, bindingId);