mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-04-05 16:40:17 +02:00
[dxbc] Only emit temp array range check for dynamically indexed stores
Generates less code and makes things slightly more readable.
This commit is contained in:
parent
c590736fec
commit
3ecd13cec2
@ -5721,7 +5721,12 @@ namespace dxvk {
|
|||||||
void DxbcCompiler::emitRegisterStore(
|
void DxbcCompiler::emitRegisterStore(
|
||||||
const DxbcRegister& reg,
|
const DxbcRegister& reg,
|
||||||
DxbcRegisterValue value) {
|
DxbcRegisterValue value) {
|
||||||
if (reg.type == DxbcOperandType::IndexableTemp) {
|
bool doRangeCheck = false;
|
||||||
|
|
||||||
|
if (reg.type == DxbcOperandType::IndexableTemp)
|
||||||
|
doRangeCheck = reg.idx[1].relReg != nullptr;
|
||||||
|
|
||||||
|
if (doRangeCheck) {
|
||||||
DxbcRegisterValue vectorId = emitIndexLoad(reg.idx[1]);
|
DxbcRegisterValue vectorId = emitIndexLoad(reg.idx[1]);
|
||||||
uint32_t boundsCheck = m_module.opULessThan(
|
uint32_t boundsCheck = m_module.opULessThan(
|
||||||
m_module.defBoolType(), vectorId.id,
|
m_module.defBoolType(), vectorId.id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user