gpu-compute: Fix flat scratch resource counters

Flat instructions may access memory locations in LDS (scratchpad) and
global (VRAM/framebuffer) and therefore increment both counters when
dispatched. Once the aperture is known, we decrement the counters of the
aperture that was *not* used. This is done incorrectly for scratch /
private flat instruction. Private memory is global and therefore local
memory counters should be decremented.

This commit fixes the counters by changing the global decrements to
local decrements.

Change-Id: I25890446908df72e5469e9dbaba6c984955196cf
This commit is contained in:
Matthew Poremba
2023-08-26 13:06:54 -05:00
parent a9b32cdb3a
commit e0379f4526

View File

@@ -919,12 +919,12 @@ GPUDynInst::resolveFlatSegment(const VectorMask &mask)
wavefront()->execUnitId = wavefront()->flatLmUnitId;
wavefront()->decLGKMInstsIssued();
if (isLoad()) {
wavefront()->rdGmReqsInPipe--;
wavefront()->rdLmReqsInPipe--;
} else if (isStore()) {
wavefront()->wrGmReqsInPipe--;
wavefront()->wrLmReqsInPipe--;
} else if (isAtomic() || isMemSync()) {
wavefront()->rdGmReqsInPipe--;
wavefront()->wrGmReqsInPipe--;
wavefront()->wrLmReqsInPipe--;
wavefront()->rdLmReqsInPipe--;
} else {
panic("Invalid memory operation!\n");
}