Merge branch 'master' into d3d12

This commit is contained in:
Triang3l 2018-12-19 22:51:26 +03:00
commit dc0b468ea8
1 changed files with 43 additions and 0 deletions

View File

@ -156,6 +156,15 @@ enum class IndexFormat : uint32_t {
kInt32,
};
// GPUSURFACENUMBER from a game .pdb.
enum class SurfaceNumFormat : uint32_t {
kUnsignedRepeat = 0,
kSignedRepeat = 1,
kUnsignedInteger = 2,
kSignedInteger = 3,
kFloat = 7,
};
enum class MsaaSamples : uint32_t {
k1X = 0,
k2X = 1,
@ -577,6 +586,40 @@ XEPACKEDUNION(xe_gpu_fetch_group_t, {
});
});
// GPU_MEMEXPORT_STREAM_CONSTANT from a game .pdb - float constant for memexport
// stream configuration.
// This is used with the floating-point ALU in shaders (written to eA using
// mad), so the dwords have a normalized exponent when reinterpreted as floats
// (otherwise they would be flushed to zero), but actually these are packed
// integers. dword_1 specifically is 2^23 because
// powf(2.0f, 23.0f) + float(i) == 0x4B000000 | i
// so mad can pack indices as integers in the lower bits.
XEPACKEDUNION(xe_gpu_memexport_stream_t, {
XEPACKEDSTRUCTANONYMOUS({
uint32_t base_address : 30; // +0 dword_0 physical address >> 2
uint32_t const_0x1 : 2; // +30
uint32_t const_0x4b000000; // +0 dword_1
Endian128 endianness : 3; // +0 dword_2
uint32_t unused_0 : 5; // +3
ColorFormat format : 6; // +8
uint32_t unused_1 : 2; // +14
SurfaceNumFormat num_format : 3; // +16
uint32_t red_blue_swap : 1; // +19
uint32_t const_0x4b0 : 12; // +20
uint32_t index_count : 23; // +0 dword_3
uint32_t const_0x96 : 9; // +23
});
XEPACKEDSTRUCTANONYMOUS({
uint32_t dword_0;
uint32_t dword_1;
uint32_t dword_2;
uint32_t dword_3;
});
});
// Enum of event values used for VGT_EVENT_INITIATOR
enum Event {
VS_DEALLOC = 0,