Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Kertels <robin.kertels@gmail.com>2023-12-25 17:34:55 +0300
committerJoshie <joshua@froggi.es>2023-12-25 17:51:02 +0300
commit9cde0b57987c833abfaf0400594cc14426d8924f (patch)
tree2d4671f1aadde3ba5945761e6f3e580c62dba435
parentadb33d3af162baef0076c58d9538332ee3379dd8 (diff)
[d3d9] Fix off-by-one when copying shader defined constants
-rw-r--r--src/d3d9/d3d9_device.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp
index 30a4a5b2..732f818c 100644
--- a/src/d3d9/d3d9_device.cpp
+++ b/src/d3d9/d3d9_device.cpp
@@ -5260,7 +5260,7 @@ namespace dxvk {
uint32_t floatCount = m_vsFloatConstsCount;
if (constSet.meta.needsConstantCopies) {
auto shader = GetCommonShader(m_state.vertexShader);
- floatCount = std::max(floatCount, shader->GetMaxDefinedConstant());
+ floatCount = std::max(floatCount, shader->GetMaxDefinedConstant() + 1);
}
floatCount = std::min(floatCount, constSet.meta.maxConstIndexF);
@@ -5322,7 +5322,7 @@ namespace dxvk {
uint32_t floatCount = ShaderStage == DxsoProgramType::VertexShader ? m_vsFloatConstsCount : m_psFloatConstsCount;
if (constSet.meta.needsConstantCopies) {
auto shader = GetCommonShader(Shader);
- floatCount = std::max(floatCount, shader->GetMaxDefinedConstant());
+ floatCount = std::max(floatCount, shader->GetMaxDefinedConstant() + 1);
}
floatCount = std::min(constSet.meta.maxConstIndexF, floatCount);