[GPU] EDRAM looped addressing (resolves #2031)
This commit is contained in:
@@ -469,16 +469,13 @@ class D3D12RenderTargetCache final : public RenderTargetCache {
|
||||
// All in tiles.
|
||||
uint32_t dest_pitch : xenos::kEdramPitchTilesBits;
|
||||
uint32_t source_pitch : xenos::kEdramPitchTilesBits;
|
||||
// Safe to use 12 bits for signed difference - no ownership transfer can
|
||||
// ever occur between render targets with EDRAM base >= 2048 as this would
|
||||
// result in 0-length spans. 10 + 10 + 12 is exactly 32, any more bits,
|
||||
// and more root 32-bit constants will be used.
|
||||
// Destination base in tiles minus source base in tiles (not vice versa
|
||||
// because this is a transform of the coordinate system, not addresses
|
||||
// themselves).
|
||||
// + 1 bit because this is a signed difference between two EDRAM bases.
|
||||
// 0 for host_depth_source_is_copy (ignored in this case anyway as
|
||||
// destination == source anyway).
|
||||
int32_t source_to_dest : xenos::kEdramBaseTilesBits;
|
||||
int32_t source_to_dest : xenos::kEdramBaseTilesBits + 1;
|
||||
};
|
||||
TransferAddressConstant() : constant(0) {
|
||||
static_assert_size(*this, sizeof(constant));
|
||||
@@ -576,7 +573,9 @@ class D3D12RenderTargetCache final : public RenderTargetCache {
|
||||
union DumpOffsets {
|
||||
uint32_t offsets;
|
||||
struct {
|
||||
uint32_t dispatch_first_tile : xenos::kEdramBaseTilesBits;
|
||||
// May be beyond the EDRAM tile count in case of EDRAM addressing
|
||||
// wrapping, thus + 1 bit.
|
||||
uint32_t dispatch_first_tile : xenos::kEdramBaseTilesBits + 1;
|
||||
uint32_t source_base_tiles : xenos::kEdramBaseTilesBits;
|
||||
};
|
||||
DumpOffsets() : offsets(0) { static_assert_size(*this, sizeof(offsets)); }
|
||||
|
||||
Reference in New Issue
Block a user