mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-11 19:24:11 +01:00
[dxso] Don't assume 32 registers.
This commit is contained in:
parent
295a58afdf
commit
037669f715
@ -41,6 +41,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
m_usedSamplers = 0;
|
m_usedSamplers = 0;
|
||||||
m_usedRTs = 0;
|
m_usedRTs = 0;
|
||||||
|
m_rRegs.reserve(DxsoMaxTempRegs);
|
||||||
|
|
||||||
for (uint32_t i = 0; i < m_rRegs.size(); i++)
|
for (uint32_t i = 0; i < m_rRegs.size(); i++)
|
||||||
m_rRegs.at(i) = DxsoRegisterPointer{ };
|
m_rRegs.at(i) = DxsoRegisterPointer{ };
|
||||||
@ -1043,6 +1044,8 @@ namespace dxvk {
|
|||||||
const DxsoBaseRegister* relative) {
|
const DxsoBaseRegister* relative) {
|
||||||
switch (reg.id.type) {
|
switch (reg.id.type) {
|
||||||
case DxsoRegisterType::Temp: {
|
case DxsoRegisterType::Temp: {
|
||||||
|
if (reg.id.num >= m_rRegs.size())
|
||||||
|
m_rRegs.resize( reg.id.num + 1, DxsoRegisterPointer { } );
|
||||||
DxsoRegisterPointer& ptr = m_rRegs.at(reg.id.num);
|
DxsoRegisterPointer& ptr = m_rRegs.at(reg.id.num);
|
||||||
if (ptr.id == 0) {
|
if (ptr.id == 0) {
|
||||||
std::string name = str::format("r", reg.id.num);
|
std::string name = str::format("r", reg.id.num);
|
||||||
|
@ -272,9 +272,7 @@ namespace dxvk {
|
|||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
// Temporary r# vector registers with immediate
|
// Temporary r# vector registers with immediate
|
||||||
// indexing, and x# vector array registers.
|
// indexing, and x# vector array registers.
|
||||||
std::array<
|
std::vector<DxsoRegisterPointer> m_rRegs;
|
||||||
DxsoRegisterPointer,
|
|
||||||
DxsoMaxTempRegs> m_rRegs;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
// Predicate registers
|
// Predicate registers
|
||||||
|
Loading…
Reference in New Issue
Block a user