Hacking shaders to get dummy texture colors and such.

This commit is contained in:
Ben Vanik
2013-10-20 00:20:36 -07:00
parent 737a567de6
commit 5a80c7b9c1
5 changed files with 219 additions and 33 deletions

View File

@@ -454,11 +454,11 @@ XEPACKEDSTRUCT(instr_fetch_tex_t, {
uint32_t fetch_valid_only : 1;
uint32_t const_idx : 5;
uint32_t tx_coord_denorm : 1;
uint32_t src_swiz : 6;
uint32_t src_swiz : 6; // xyz
});
/* dword1: */
XEPACKEDSTRUCTANONYMOUS({
uint32_t dst_swiz : 12;
uint32_t dst_swiz : 12; // xyzw
uint32_t mag_filter : 2; // instr_tex_filter_t
uint32_t min_filter : 2; // instr_tex_filter_t
uint32_t mip_filter : 2; // instr_tex_filter_t

View File

@@ -98,12 +98,26 @@ XEPACKEDUNION(xe_gpu_vertex_fetch_t, {
// XE_GPU_REG_SHADER_CONSTANT_FETCH_*
XEPACKEDUNION(xe_gpu_texture_fetch_t, {
XEPACKEDSTRUCTANONYMOUS({
uint32_t unk0;
uint32_t unk1;
uint32_t unk2;
uint32_t unk3;
uint32_t unk4;
uint32_t unk5;
uint32_t type : 2; // dword_0
uint32_t unk0 : 20;
uint32_t pitch : 9;
uint32_t tiled : 1;
uint32_t format : 6; // dword_1
uint32_t endianness : 2;
uint32_t unk1 : 4;
uint32_t address : 20;
union { // dword_2
struct {
uint32_t width : 13;
uint32_t height : 13;
uint32_t unksize2d : 6;
} size_2d;
};
uint32_t unk3; // dword_3
uint32_t unk4; // dword_4
uint32_t unk5 : 9; // dword_5
uint32_t dimension : 2;
uint32_t unk5b : 21;
});
XEPACKEDSTRUCTANONYMOUS({
uint32_t dword_0;