This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Set INDEX_STRIDE for scratch coalescing
ClosedPublic

Authored by mareko on Jun 8 2016, 7:26 AM.

Details

Summary

Mesa and other users must set this to enable coalescing:

  • STRIDE = 0
  • SWIZZLE_ENABLE = 1

DiRT Showdown - apitrace results:

Before: 17.73 FPS
After:  19.77 FPS

Diff Detail

Repository
rL LLVM

Event Timeline

mareko updated this revision to Diff 60033.Jun 8 2016, 7:26 AM
mareko retitled this revision from to AMDGPU/SI: Set INDEX_STRIDE for scratch coalescing.
mareko updated this object.
mareko added reviewers: tstellarAMD, arsenm.
arsenm edited edge metadata.Jun 8 2016, 11:41 AM

Can you add a test that shows the bit change in the resource setup? I would expect the tests would be breaking on this already

lib/Target/AMDGPU/SIInstrInfo.cpp
3098 ↗(On Diff #60033)

C++ style comments

mareko added a comment.Jun 8 2016, 3:58 PM

Why would it be breaking? This is the only place that clears DATA_FORMAT and sets ADD_TID_ENABLE, both of which are required for scratch to even work. Or did you mean something else?

arsenm added a comment.Jun 8 2016, 3:59 PM

Why would it be breaking? This is the only place that clears DATA_FORMAT and sets ADD_TID_ENABLE, both of which are required for scratch to even work. Or did you mean something else?

The tests check the complete 32-bit value moved into the register

mareko updated this revision to Diff 60215.Jun 9 2016, 11:34 AM
mareko edited edge metadata.

Fixed the tests and the comment.

arsenm accepted this revision.Jun 9 2016, 11:43 AM
arsenm edited edge metadata.

LGTM

lib/Target/AMDGPU/SIInstrInfo.cpp
3098 ↗(On Diff #60215)

Ditto

lib/Target/AMDGPU/SIInstrInfo.h
553 ↗(On Diff #60215)

UINT64_C() instead of LL

This revision is now accepted and ready to land.Jun 9 2016, 11:43 AM
This revision was automatically updated to reflect the committed changes.