Changeset 3257 in CLRX


Ignore:
Timestamp:
Aug 16, 2017, 8:43:18 PM (16 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Fixes for GCN1.4 arch (RX VEGA).

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/AsmAmdCL2Format.cpp

    r2999 r3257  
    14861486                   ((config.scratchBufferSize!=0) ? GPUSETUP_SCRATCH_EN : 0), minRegsNum);
    14871487       
    1488         const cxuint neededExtraSGPRsNum = arch==GPUArchitecture::GCN1_2 ? 6 : 4;
     1488        const cxuint neededExtraSGPRsNum = arch>=GPUArchitecture::GCN1_2 ? 6 : 4;
    14891489        const cxuint extraSGPRsNum = (config.useEnqueue || config.useGeneric) ?
    14901490                    neededExtraSGPRsNum : 2;
  • CLRadeonExtender/trunk/utils/GPUId.cpp

    r3256 r3257  
    193193    if (regType == REGTYPE_VGPR)
    194194        return 256; // VGPRS
    195     cxuint maxSgprs = (architecture==GPUArchitecture::GCN1_2) ? 102 : 104;
     195    cxuint maxSgprs = (architecture>=GPUArchitecture::GCN1_2) ? 102 : 104;
    196196    if ((flags & REGCOUNT_NO_FLAT)!=0 && (architecture>GPUArchitecture::GCN1_0))
    197         maxSgprs -= (architecture==GPUArchitecture::GCN1_2) ? 6 : 4;
     197        maxSgprs -= (architecture>=GPUArchitecture::GCN1_2) ? 6 : 4;
    198198    else if ((flags & REGCOUNT_NO_XNACK)!=0 && (architecture>GPUArchitecture::GCN1_1))
    199199        maxSgprs -= 4;
     
    208208        return 256;
    209209    else
    210         return (archMask&(1U<<int(GPUArchitecture::GCN1_2))) ? 102 : 104;
     210        return (archMask&(7U<<int(GPUArchitecture::GCN1_2))) ? 102 : 104;
    211211}
    212212
     
    237237        return 0;
    238238    if ((flags & GCN_FLAT)!=0 && (architecture>GPUArchitecture::GCN1_0))
    239         return (architecture==GPUArchitecture::GCN1_2) ? 6 : 4;
     239        return (architecture>=GPUArchitecture::GCN1_2) ? 6 : 4;
    240240    else if ((flags & GCN_XNACK)!=0 && (architecture>GPUArchitecture::GCN1_1))
    241241        return 4;
Note: See TracChangeset for help on using the changeset viewer.