mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 16:24:29 +01: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(
|
||||
const DxbcRegister& reg,
|
||||
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]);
|
||||
uint32_t boundsCheck = m_module.opULessThan(
|
||||
m_module.defBoolType(), vectorId.id,
|
||||
|
Loading…
Reference in New Issue
Block a user