Skip to content

Commit e7ec5be

Browse files
WinterSnowfalldoitsujin
authored andcommitted
[d3d9] Use roundEven for fixed function array access
1 parent 2bfdc80 commit e7ec5be

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/d3d9/d3d9_fixed_function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ namespace dxvk {
10771077

10781078
if (m_vsKey.Data.Contents.VertexBlendIndexed) {
10791079
uint32_t index = m_module.opCompositeExtract(m_floatType, m_vs.in.BLENDINDICES, 1, &i);
1080-
index = m_module.opConvertFtoU(m_uint32Type, m_module.opRound(m_floatType, index));
1080+
index = m_module.opConvertFtoU(m_uint32Type, m_module.opRoundEven(m_floatType, index));
10811081

10821082
arrayIndices = { m_module.constu32(0), index };
10831083
}

src/d3d9/shaders/d3d9_fixed_function_vert.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ void main() {
367367
for (uint i = 0; i <= vertexBlendCount(); i++) {
368368
uint arrayIndex;
369369
if (vertexBlendIndexed()) {
370-
arrayIndex = uint(round(in_BlendIndices[i]));
370+
arrayIndex = uint(roundEven(in_BlendIndices[i]));
371371
} else {
372372
arrayIndex = i;
373373
}

0 commit comments

Comments
 (0)