Texture/Xbox 360

From Burnout Wiki

Structures

Most of this information is derived from the MS Xbox 360 SDK and Burnout Paradise (2008-01-30 build)'s XDB.

D3DBaseTexture

Offset Length Type Name Description Comments
0x0 0x4 DWORD Common See Common
0x4 0x4 DWORD ReferenceCount
0x8 0x4 DWORD Fence
0xC 0x4 DWORD ReadFence
0x10 0x4 DWORD Identifier
0x14 0x4 DWORD BaseFlush
0x18 0x4 DWORD MipFlush
0x1C 0x18 DWORD[6] GPUTEXTURE_FETCH_CONSTANT See GPUTEXTURE_FETCH_CONSTANT

Common

Based on information from indirivacua.

Offset (bits) Length (bits) Name Description Comments
0 28 Flags D3D resource flags
28 4 Type D3D resource type See D3DRESOURCETYPE

GPUTEXTURE_FETCH_CONSTANT

Official documentation is in LSB 0 notation. It has been converted to MSB 0 and its DWORDs have been merged into one table.

Offset (bits) Length (bits) Name Description Comments
0 1 Tiled Start of DWORD 0
1 9 Pitch
10 1 Padding
11 2 MultiSample D3D construct: not used by hardware
See GPUMULTISAMPLE_TYPE
13 3 ClampZ See GPUCLAMP
16 3 ClampY See GPUCLAMP
19 3 ClampX See GPUCLAMP
22 2 SignW See GPUSIGN
24 2 SignZ See GPUSIGN
26 2 SignY See GPUSIGN
28 2 SignX See GPUSIGN
30 2 Type See GPUCONSTANTTYPE
32 20 BaseAddress Start of DWORD 1
52 1 ClampPolicy See GPUCLAMPPOLICY
53 1 Stacked
54 2 RequestSize See GPUREQUESTSIZE
56 2 Endian See GPUENDIAN
58 6 DataFormat See GPUTEXTUREFORMAT
64 32 Size Start of DWORD 2
See GPUTEXTURESIZE
96 1 BorderSize Start of DWORD 3
97 3 Padding
100 3 AnisoFilter See GPUANISOFILTER
103 2 MipFilter See GPUMIPFILTER
105 2 MinFilter See GPUMINMAGFILTER
107 2 MagFilter See GPUMINMAGFILTER
109 6 ExpAdjust
115 3 SwizzleW See GPUSWIZZLE
118 3 SwizzleZ See GPUSWIZZLE
121 3 SwizzleY See GPUSWIZZLE
124 3 SwizzleX See GPUSWIZZLE
127 1 NumFormat See GPUNUMFORMAT
128 5 GradExpAdjustV Start of DWORD 4
133 5 GradExpAdjustH
138 10 LODBias
148 1 MinAnisoWalk
149 1 MagAnisoWalk
150 4 MaxMipLevel
154 4 MinMipLevel
158 1 VolMinFilter See GPUMINMAGFILTER
159 1 VolMagFilter See GPUMINMAGFILTER
160 20 MipAddress Start of DWORD 5
180 1 PackedMips
181 2 Dimension See GPUDIMENSION
183 4 AnisoBias
187 2 TriClamp See GPUTRICLAMP
189 1 ForceBCWToMax
190 2 BorderColor See GPUBORDERCOLOR

GPUTEXTURESIZE

Four structures used in the union Size.

GPUTEXTURESIZE_1D

Offset (bits) Length (bits) Name Description Comments
0 24 Width
24 8 Padding

GPUTEXTURESIZE_2D

Offset (bits) Length (bits) Name Description Comments
0 13 Width
13 13 Height
26 6 Padding

GPUTEXTURESIZE_3D

Offset (bits) Length (bits) Name Description Comments
0 11 Width
11 11 Height
22 10 Depth

GPUTEXTURESIZE_STACK

Offsets (bits) Length (bits) Name Description Comments
0 13 Width
13 13 Height
26 6 Depth

Unions

Size

Length Type Name Description Comments
0x4 GPUTEXTURESIZE_1D OneD
0x4 GPUTEXTURESIZE_2D TwoD
0x4 GPUTEXTURESIZE_3D ThreeD
0x4 GPUTEXTURESIZE_STACK Stack

Enumerations

From the MS Xbox 360 SDK and Burnout Paradise (2008-01-30 build)'s XDB.

D3DRESOURCETYPE

Name Value Comments
D3DRTYPE_NONE 0 No resource is specified.
D3DRTYPE_VERTEXBUFFER 1 Vertex buffer resource.
D3DRTYPE_INDEXBUFFER 2 Index buffer resource.
D3DRTYPE_TEXTURE 3 Texture resource.
D3DRTYPE_SURFACE 4 Surface resource.
D3DRTYPE_VERTEXDECLARATION 5 Vertex declaration resource.
D3DRTYPE_VERTEXSHADER 6 Vertex shader resource.
D3DRTYPE_PIXELSHADER 7 Pixel shader resource.
D3DRTYPE_CONSTANTBUFFER 8 Constant buffer resource.
D3DRTYPE_COMMANDBUFFER 9 Command buffer resource.
D3DRTYPE_ASYNCCOMMANDBUFFERCALL 10 Aysnchronous command buffer call resource.
D3DRTYPE_PERFCOUNTERBATCH 11 Performance counter batch resource.
D3DRTYPE_OCCLUSIONQUERYBATCH 12 Occlusion query batch resource.
D3DRTYPE_VOLUME 16 Volume resource.
D3DRTYPE_VOLUMETEXTURE 17 Volume texture resource.
D3DRTYPE_CUBETEXTURE 18 Cube texture resource.
D3DRTYPE_ARRAYTEXTURE 19 Array texture resource.
D3DRTYPE_LINETEXTURE 20 Line texture resource.
D3DRTYPE_FORCE_DWORD 0x7FFFFFFF Forces this enumeration to compile to 32 bits in size. This value is not used.

GPUCONSTANTTYPE

Name Value Comments
GPUCONSTANTTYPE_INVALID_TEXTURE 0
GPUCONSTANTTYPE_INVALID_VERTEX 1
GPUCONSTANTTYPE_TEXTURE 2
GPUCONSTANTTYPE_VERTEX 3

GPUSIGN

Name Value Comments
GPUSIGN_UNSIGNED 0 Indicates that a value is unsigned.
GPUSIGN_SIGNED 1 Indicates that a value is signed.
GPUSIGN_BIAS 2 Indicates that a value is unsigned biased. GPUSIGN_BIAS maps an UNSIGNED value with a range of 0 to 1 into a range of -1 to 1. The equation used to perform the mapping is 2 * x - 1. For example, the UNSIGNED values 0, 0.5 and 1 would map to -1, 0 and 1.
GPUSIGN_GAMMA 3 Indicates that a value is unsigned gamma corrected.

GPUCLAMP

Name Value Comments
GPUCLAMP_WRAP 0
GPUCLAMP_MIRROR 1
GPUCLAMP_CLAMP_TO_LAST 2
GPUCLAMP_MIRROR_ONCE_TO_LAST 3
GPUCLAMP_CLAMP_HALFWAY 4
GPUCLAMP_MIRROR_ONCE_HALFWAY 5
GPUCLAMP_CLAMP_TO_BORDER 6
GPUCLAMP_MIRROR_TO_BORDER 7

GPUMULTISAMPLE_TYPE

Name Value Comments
D3DMULTISAMPLE_NONE 0
D3DMULTISAMPLE_2_SAMPLES 1
D3DMULTISAMPLE_4_SAMPLES 2
D3DMULTISAMPLE_FORCE_DWORD 0x7FFFFFFF

GPUTEXTUREFORMAT

Name Value Comments
GPUTEXTUREFORMAT_1_REVERSE 0
GPUTEXTUREFORMAT_1 1 Texture format with a single 1-bit channel.
GPUTEXTUREFORMAT_8 2 Texture format with a single 8 bit channel.
GPUTEXTUREFORMAT_1_5_5_5 3 Texture format with a single 1-bit channel and three 5-bit channels.
GPUTEXTUREFORMAT_5_6_5 4 Texture format with one 6-bit channel and two 5-bit channels.
GPUTEXTUREFORMAT_6_5_5 5 Texture format with one 6-bit channel and two 5-bit channels.
GPUTEXTUREFORMAT_8_8_8_8 6 Texture format with four 8-bit channels.
GPUTEXTUREFORMAT_2_10_10_10 7 Texture format with a single 2-bit channel and three 10-bit channels.
GPUTEXTUREFORMAT_8_A 8 Texture format with a single 8-bit channel.
GPUTEXTUREFORMAT_8_B 9 Texture format with a single 8-bit channel.
GPUTEXTUREFORMAT_8_8 10 Texture format with two 8-bit channels.
GPUTEXTUREFORMAT_Cr_Y1_Cb_Y0_REP 11 Texture format with two texels stored in each word. Each data value (Cr, Y1, Cb, Y0) is 8 bits. The Cr and Cb specify the chrominance and are shared by both texels. The Y0 and Y1 values specify the luminance of the respective texels.
GPUTEXTUREFORMAT_Y1_Cr_Y0_Cb_REP 12 Texture format with two texels stored in each word. Each data value (Y1, Cr, Y0, Cb) is 8 bits. The Cr and Cb specify the chrominance and are shared by both texels. The Y0 and Y1 values specify the luminance of the respective texels.
GPUTEXTUREFORMAT_16_16_EDRAM 13 Format with two 16-bit channels. Format is not applicable to textures and only applies to render targets in EDRAM.
GPUTEXTUREFORMAT_8_8_8_8_A 14 Texture format with four 8-bit channels.
GPUTEXTUREFORMAT_4_4_4_4 15 Texture format with four 4-bit channels.
GPUTEXTUREFORMAT_10_11_11 16 Texture format with a single 10-bit channel and two 11-bit channels.
GPUTEXTUREFORMAT_11_11_10 17 Texture format with a single 10-bit channel and two 11-bit channels.
GPUTEXTUREFORMAT_DXT1 18 DXT1 compression texture format with 4 bits per texel.
GPUTEXTUREFORMAT_DXT2_3 19 DXT2 compression texture format with 8 bits per texel.
GPUTEXTUREFORMAT_DXT4_5 20 DXT4 compression texture format with 8 bits per texel.
GPUTEXTUREFORMAT_16_16_16_16_EDRAM 21 Format with four 16-bit channels. Format is not applicable to textures and only applies to render targets in EDRAM.
GPUTEXTUREFORMAT_24_8 22 Texture format with a 24-bit channel and an 8-bit channel. When applied to textures the 8-bit channel is ignored. When applied to depth-stencil targets the 8-bit channel maps to stencil.
GPUTEXTUREFORMAT_24_8_FLOAT 23 Texture format with a 24-bit float channel and an 8-bit integer channel. When applied to textures the 8-bit channel is ignored. When applied to depth-stencil targets the 8-bit channel maps to stencil.
GPUTEXTUREFORMAT_16 24 Texture format with a single 16-bit channel.
GPUTEXTUREFORMAT_16_16 25 Texture format with two 16-bit channels.
GPUTEXTUREFORMAT_16_16_16_16 26 Texture format with four 16-bit channels.
GPUTEXTUREFORMAT_16_EXPAND 27 16-bit float texture format that is expanded to 32-bit (16.16) fixed point during sampling to allow filtering. This format samples at half the rate of GPUTEXTUREFORMAT_16.
GPUTEXTUREFORMAT_16_16_EXPAND 28 32-bit float texture format that is expanded to 64-bit (16.16, 16.16) fixed point during sampling to allow filtering. This format samples at half the rate of GPUTEXTUREFORMAT_16_16.
GPUTEXTUREFORMAT_16_16_16_16_EXPAND 29 64-bit float texture format that is expanded to 128-bit (16.16, 16.16, 16.16, 16.16) fixed point during sampling to allow filtering. This format samples at half the rate of GPUTEXTUREFORMAT_16_16_16_16.
GPUTEXTUREFORMAT_16_FLOAT 30 Texture format with a single 16-bit float channel.
GPUTEXTUREFORMAT_16_16_FLOAT 31 Texture format with two 16-bit float channels.
GPUTEXTUREFORMAT_16_16_16_16_FLOAT 32 Texture format with four 16-bit float channels.
GPUTEXTUREFORMAT_32 33 Texture format with a single 32-bit channel.
GPUTEXTUREFORMAT_32_32 34 Texture format with two 32-bit channels.
GPUTEXTUREFORMAT_32_32_32_32 35 Texture format with four 32-bit channels.
GPUTEXTUREFORMAT_32_FLOAT 36 Texture format with a single 32-bit float channel.
GPUTEXTUREFORMAT_32_32_FLOAT 37 Texture format with two 32-bit float channels.
GPUTEXTUREFORMAT_32_32_32_32_FLOAT 38 Texture format with four 32-bit float channels.
GPUTEXTUREFORMAT_32_AS_8 39 Texture format with a single 32-bit channel that is stored as an 8-bit channel in the texture cache.
GPUTEXTUREFORMAT_32_AS_8_8 40 Texture format with a single 32-bit channel that is stored as two 8-bit channels in the texture cache.
GPUTEXTUREFORMAT_16_MPEG 41 Texture format with a single 16-bit channel.
GPUTEXTUREFORMAT_16_16_MPEG 42 Texture format with two 16-bit channels.
GPUTEXTUREFORMAT_8_INTERLACED 43 Texture format with a single 8-bit channel.
GPUTEXTUREFORMAT_32_AS_8_INTERLACED 44 Texture format with a single 32-bit channel that is stored as an 8-bit channel in the texture cache.
GPUTEXTUREFORMAT_32_AS_8_8_INTERLACED 45 Texture format with a single 32-bit channel that is stored as two 8-bit channels in the texture cache.
GPUTEXTUREFORMAT_16_INTERLACED 46 Texture format with a single 16-bit channel.
GPUTEXTUREFORMAT_16_MPEG_INTERLACED 47 Texture format with a single 16-bit channel.
GPUTEXTUREFORMAT_16_16_MPEG_INTERLACED 48 Texture format with two 16-bit channels.
GPUTEXTUREFORMAT_DXN 49 Two-component 8-bit per texel format made up of two DXT4/5 alpha blocks.
GPUTEXTUREFORMAT_8_8_8_8_AS_16_16_16_16 50 GPUTEXTUREFORMAT_8_8_8_8 texture format that is stored as four 16-bit channels in the texture cache.
GPUTEXTUREFORMAT_DXT1_AS_16_16_16_16 51 GPUTEXTUREFORMAT_DXT1 texture format that is stored as four 16-bit channels in the texture cache.
GPUTEXTUREFORMAT_DXT2_3_AS_16_16_16_16 52 GPUTEXTUREFORMAT_DXT2_3 texture format that is stored as four 16-bit channels in the texture cache.
GPUTEXTUREFORMAT_DXT4_5_AS_16_16_16_16 53 GPUTEXTUREFORMAT_DXT4_5 texture format that is stored as four 16-bit channels in the texture cache.
GPUTEXTUREFORMAT_2_10_10_10_AS_16_16_16_16 54 GPUTEXTUREFORMAT_2_10_10_10 texture format that is stored as four 16-bit channels in the texture cache.
GPUTEXTUREFORMAT_10_11_11_AS_16_16_16_16 55 GPUTEXTUREFORMAT_10_11_11 texture format that is stored as four 16-bit channels in the texture cache.
GPUTEXTUREFORMAT_11_11_10_AS_16_16_16_16 56 GPUTEXTUREFORMAT_11_11_10 texture format that is stored as four 16-bit channels in the texture cache.
GPUTEXTUREFORMAT_32_32_32_FLOAT 57 Texture format with three 32-bit float channels.
GPUTEXTUREFORMAT_DXT3A 58 Single-component 4-bit per texel format made up of a DXT2/3 alpha block.
GPUTEXTUREFORMAT_DXT5A 59 Single-component 4-bit per texel format made up of a DXT4/5 alpha block.
GPUTEXTUREFORMAT_CTX1 60 Two-component 4-bit per texel format similar to DXT1 but with 8:8 colors instead of 5:6:5 colors.
GPUTEXTUREFORMAT_DXT3A_AS_1_1_1_1 61 Four-component format encoded in a DXT2/3 alpha block where each bit is expanded into a separate channel.
GPUTEXTUREFORMAT_8_8_8_8_GAMMA_EDRAM 62 Format with four 8-bit channels. Format is not applicable to textures and only applies to render targets in EDRAM.
GPUTEXTUREFORMAT_2_10_10_10_FLOAT_EDRAM 63 Format with a single 2-bit float channel and three 10-bit float channels. Format is not applicable to textures and only applies to render targets in EDRAM.

GPUENDIAN

Name Value Comments
GPUENDIAN_NONE 0
GPUENDIAN_8IN16 1
GPUENDIAN_8IN32 2
GPUENDIAN_16IN32 3

GPUREQUESTSIZE

Name Value Comments
GPUREQUESTSIZE_256BIT 0
GPUREQUESTSIZE_512BIT 1

GPUCLAMPPOLICY

Name Value Comments
GPUCLAMPPOLICY_D3D 0
GPUCLAMPPOLICY_OGL 1

GPUNUMFORMAT

Name Value Comments
GPUNUMFORMAT_FRACTION 0 Indicates that a value is a fraction.
GPUNUMFORMAT_INTEGER 1 Indicates that a value is an integer.

GPUSWIZZLE

Name Value Comments
GPUSWIZZLE_X 0 Describes the X component of a register.
GPUSWIZZLE_Y 1 Describes the Y component of a register.
GPUSWIZZLE_Z 2 Describes the Z component of a register.
GPUSWIZZLE_W 3 Describes the W component of a register.
GPUSWIZZLE_0 4 Describes the 0 component of a register.
GPUSWIZZLE_1 5 Describes the 1 component of a register.

GPUMINMAGFILTER

Name Value Comments
GPUMINMAGFILTER_POINT 0
GPUMINMAGFILTER_LINEAR 1
GPUMINMAGFILTER_KEEP 2

GPUMIPFILTER

Name Value Comments
GPUMIPFILTER_POINT 0
GPUMIPFILTER_LINEAR 1
GPUMIPFILTER_BASEMAP 2
GPUMIPFILTER_KEEP 3

GPUANISOFILTER

Name Value Comments
GPUANISOFILTER_DISABLED 0
GPUANISOFILTER_MAX1TO1 1
GPUANISOFILTER_MAX2TO1 2
GPUANISOFILTER_MAX4TO1 3
GPUANISOFILTER_MAX8TO1 4
GPUANISOFILTER_MAX16TO1 5
GPUANISOFILTER_KEEP 7

GPUBORDERCOLOR

Name Value Comments
GPUBORDERCOLOR_ABGR_BLACK 0
GPUBORDERCOLOR_ABGR_WHITE 1
GPUBORDERCOLOR_ACBYCR_BLACK 2
GPUBORDERCOLOR_ACBCRY_BLACK 3

GPUTRICLAMP

Name Value Comments
GPUTRICLAMP_NORMAL 0
GPUTRICLAMP_ONE_SIXTH 1
GPUTRICLAMP_ONE_FOURTH 2
GPUTRICLAMP_THREE_EIGHTHS 3

GPUDIMENSION

Name Value Comments
GPUDIMENSION_1D 0
GPUDIMENSION_2D 1
GPUDIMENSION_3D 2
GPUDIMENSION_CUBEMAP 3