[GPU] Use `le<>` type for depth sample counts

This commit is contained in:
Joel Linn 2021-05-20 22:21:41 +02:00 committed by Rick Gibbed
parent e58686c9df
commit 806a33d625
2 changed files with 9 additions and 8 deletions

View File

@ -1145,6 +1145,7 @@ bool CommandProcessor::ExecutePacketType3_EVENT_WRITE_EXT(RingBuffer* reader,
bool CommandProcessor::ExecutePacketType3_EVENT_WRITE_ZPD(RingBuffer* reader,
uint32_t packet,
uint32_t count) {
// Set by D3D as BE but struct ABI is LE
const uint32_t kQueryFinished = xe::byte_swap(0xFFFFFEED);
assert_true(count == 1);
uint32_t initiator = reader->ReadAndSwap<uint32_t>();

View File

@ -1229,14 +1229,14 @@ struct alignas(uint32_t) xe_gpu_depth_sample_counts {
// This is little endian as it is swapped in D3D code.
// Corresponding A and B values are summed up by D3D.
// Occlusion there is calculated by substracting begin from end struct.
uint32_t Total_A;
uint32_t Total_B;
uint32_t ZFail_A;
uint32_t ZFail_B;
uint32_t ZPass_A;
uint32_t ZPass_B;
uint32_t StencilFail_A;
uint32_t StencilFail_B;
le<uint32_t> Total_A;
le<uint32_t> Total_B;
le<uint32_t> ZFail_A;
le<uint32_t> ZFail_B;
le<uint32_t> ZPass_A;
le<uint32_t> ZPass_B;
le<uint32_t> StencilFail_A;
le<uint32_t> StencilFail_B;
};
static_assert_size(xe_gpu_depth_sample_counts, sizeof(uint32_t) * 8);