Texture/Xbox 360: Difference between revisions
Content added Content deleted
(Removed GPUTEXTUREFORMAT note as it was wrong (I counted the bits wrong initially)) |
m (Normalization) |
||
Line 4: | Line 4: | ||
=== D3DBaseTexture === |
=== D3DBaseTexture === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x4 || DWORD || Common || || See [[#Common |
| 0x0 || 0x4 || DWORD || Common || || See [[#Common|Common]] |
||
|- |
|- |
||
| 0x4 || 0x4 || DWORD || ReferenceCount || || |
| 0x4 || 0x4 || DWORD || ReferenceCount || || |
||
Line 21: | Line 20: | ||
| 0x18 || 0x4 || DWORD || MipFlush || || |
| 0x18 || 0x4 || DWORD || MipFlush || || |
||
|- |
|- |
||
| 0x1C || 0x18 || DWORD[6] || GPUTEXTURE_FETCH_CONSTANT || || See [[#GPUTEXTURE_FETCH_CONSTANT |
| 0x1C || 0x18 || DWORD[6] || GPUTEXTURE_FETCH_CONSTANT || || See [[#GPUTEXTURE_FETCH_CONSTANT|GPUTEXTURE_FETCH_CONSTANT]] |
||
|} |
|} |
||
Line 28: | Line 27: | ||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0 || 28 || Flags || D3D resource flags || |
| 0 || 28 || Flags || D3D resource flags || |
||
|- |
|- |
||
| 28 || 4 || Type || D3D resource type || See [[#D3DRESOURCETYPE |
| 28 || 4 || Type || D3D resource type || See [[#D3DRESOURCETYPE|D3DRESOURCETYPE]] |
||
|} |
|} |
||
Line 40: | Line 38: | ||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
||
|- |
|- |
||
Line 47: | Line 44: | ||
| 1 || 9 || Pitch || || |
| 1 || 9 || Pitch || || |
||
|- |
|- |
||
| 10 || 1 || || |
| 10 || 1 || || Padding || |
||
|- |
|- |
||
| 11 || 2 || MultiSample || || D3D construct: not used by hardware<br/>See [[#GPUMULTISAMPLE_TYPE |
| 11 || 2 || MultiSample || || D3D construct: not used by hardware<br/>See [[#GPUMULTISAMPLE_TYPE|GPUMULTISAMPLE_TYPE]] |
||
|- |
|- |
||
| 13 || 3 || ClampZ || || See [[#GPUCLAMP |
| 13 || 3 || ClampZ || || See [[#GPUCLAMP|GPUCLAMP]] |
||
|- |
|- |
||
| 16 || 3 || ClampY || || See [[#GPUCLAMP |
| 16 || 3 || ClampY || || See [[#GPUCLAMP|GPUCLAMP]] |
||
|- |
|- |
||
| 19 || 3 || ClampX || || See [[#GPUCLAMP |
| 19 || 3 || ClampX || || See [[#GPUCLAMP|GPUCLAMP]] |
||
|- |
|- |
||
| 22 || 2 || SignW || || See [[#GPUSIGN |
| 22 || 2 || SignW || || See [[#GPUSIGN|GPUSIGN]] |
||
|- |
|- |
||
| 24 || 2 || SignZ || || See [[#GPUSIGN |
| 24 || 2 || SignZ || || See [[#GPUSIGN|GPUSIGN]] |
||
|- |
|- |
||
| 26 || 2 || SignY || || See [[#GPUSIGN |
| 26 || 2 || SignY || || See [[#GPUSIGN|GPUSIGN]] |
||
|- |
|- |
||
| 28 || 2 || SignX || || See [[#GPUSIGN |
| 28 || 2 || SignX || || See [[#GPUSIGN|GPUSIGN]] |
||
|- |
|- |
||
| 30 || 2 || Type || || See [[#GPUCONSTANTTYPE |
| 30 || 2 || Type || || See [[#GPUCONSTANTTYPE|GPUCONSTANTTYPE]] |
||
|- |
|- |
||
| 32 || 20 || BaseAddress || || Start of DWORD 1 |
| 32 || 20 || BaseAddress || || Start of DWORD 1 |
||
|- |
|- |
||
| 52 || 1 || ClampPolicy || || See [[#GPUCLAMPPOLICY |
| 52 || 1 || ClampPolicy || || See [[#GPUCLAMPPOLICY|GPUCLAMPPOLICY]] |
||
|- |
|- |
||
| 53 || 1 || Stacked || || |
| 53 || 1 || Stacked || || |
||
|- |
|- |
||
| 54 || 2 || RequestSize || || See [[#GPUREQUESTSIZE |
| 54 || 2 || RequestSize || || See [[#GPUREQUESTSIZE|GPUREQUESTSIZE]] |
||
|- |
|- |
||
| 56 || 2 || Endian || || See [[#GPUENDIAN |
| 56 || 2 || Endian || || See [[#GPUENDIAN|GPUENDIAN]] |
||
|- |
|- |
||
| 58 || 6 || DataFormat || || See [[#GPUTEXTUREFORMAT |
| 58 || 6 || DataFormat || || See [[#GPUTEXTUREFORMAT|GPUTEXTUREFORMAT]] |
||
|- |
|- |
||
| 64 || 32 || Size || || Start of DWORD 2<br/>See [[#GPUTEXTURESIZE |
| 64 || 32 || Size || || Start of DWORD 2<br/>See [[#GPUTEXTURESIZE|GPUTEXTURESIZE]] |
||
|- |
|- |
||
| 96 || 1 || BorderSize || || Start of DWORD 3 |
| 96 || 1 || BorderSize || || Start of DWORD 3 |
||
|- |
|- |
||
| 97 || 3 || || |
| 97 || 3 || || Padding || |
||
|- |
|- |
||
| 100 || 3 || AnisoFilter || || See [[#GPUANISOFILTER |
| 100 || 3 || AnisoFilter || || See [[#GPUANISOFILTER|GPUANISOFILTER]] |
||
|- |
|- |
||
| 103 || 2 || MipFilter || || See [[#GPUMIPFILTER |
| 103 || 2 || MipFilter || || See [[#GPUMIPFILTER|GPUMIPFILTER]] |
||
|- |
|- |
||
| 105 || 2 || MinFilter || || See [[#GPUMINMAGFILTER |
| 105 || 2 || MinFilter || || See [[#GPUMINMAGFILTER|GPUMINMAGFILTER]] |
||
|- |
|- |
||
| 107 || 2 || MagFilter || || See [[#GPUMINMAGFILTER |
| 107 || 2 || MagFilter || || See [[#GPUMINMAGFILTER|GPUMINMAGFILTER]] |
||
|- |
|- |
||
| 109 || 6 || ExpAdjust || || |
| 109 || 6 || ExpAdjust || || |
||
|- |
|- |
||
| 115 || 3 || SwizzleW || || See [[#GPUSWIZZLE |
| 115 || 3 || SwizzleW || || See [[#GPUSWIZZLE|GPUSWIZZLE]] |
||
|- |
|- |
||
| 118 || 3 || SwizzleZ || || See [[#GPUSWIZZLE |
| 118 || 3 || SwizzleZ || || See [[#GPUSWIZZLE|GPUSWIZZLE]] |
||
|- |
|- |
||
| 121 || 3 || SwizzleY || || See [[#GPUSWIZZLE |
| 121 || 3 || SwizzleY || || See [[#GPUSWIZZLE|GPUSWIZZLE]] |
||
|- |
|- |
||
| 124 || 3 || SwizzleX || || See [[#GPUSWIZZLE |
| 124 || 3 || SwizzleX || || See [[#GPUSWIZZLE|GPUSWIZZLE]] |
||
|- |
|- |
||
| 127 || 1 || NumFormat || || See [[#GPUNUMFORMAT |
| 127 || 1 || NumFormat || || See [[#GPUNUMFORMAT|GPUNUMFORMAT]] |
||
|- |
|- |
||
| 128 || 5 || GradExpAdjustV || || Start of DWORD 4 |
| 128 || 5 || GradExpAdjustV || || Start of DWORD 4 |
||
Line 119: | Line 116: | ||
| 154 || 4 || MinMipLevel || || |
| 154 || 4 || MinMipLevel || || |
||
|- |
|- |
||
| 158 || 1 || VolMinFilter || || See [[#GPUMINMAGFILTER |
| 158 || 1 || VolMinFilter || || See [[#GPUMINMAGFILTER|GPUMINMAGFILTER]] |
||
|- |
|- |
||
| 159 || 1 || VolMagFilter || || See [[#GPUMINMAGFILTER |
| 159 || 1 || VolMagFilter || || See [[#GPUMINMAGFILTER|GPUMINMAGFILTER]] |
||
|- |
|- |
||
| 160 || 20 || MipAddress || || Start of DWORD 5 |
| 160 || 20 || MipAddress || || Start of DWORD 5 |
||
Line 127: | Line 124: | ||
| 180 || 1 || PackedMips || || |
| 180 || 1 || PackedMips || || |
||
|- |
|- |
||
| 181 || 2 || Dimension || || See [[#GPUDIMENSION |
| 181 || 2 || Dimension || || See [[#GPUDIMENSION|GPUDIMENSION]] |
||
|- |
|- |
||
| 183 || 4 || AnisoBias || || |
| 183 || 4 || AnisoBias || || |
||
|- |
|- |
||
| 187 || 2 || TriClamp || || See [[#GPUTRICLAMP |
| 187 || 2 || TriClamp || || See [[#GPUTRICLAMP|GPUTRICLAMP]] |
||
|- |
|- |
||
| 189 || 1 || ForceBCWToMax || || |
| 189 || 1 || ForceBCWToMax || || |
||
|- |
|- |
||
| 190 || 2 || BorderColor || || See [[#GPUBORDERCOLOR |
| 190 || 2 || BorderColor || || See [[#GPUBORDERCOLOR|GPUBORDERCOLOR]] |
||
|} |
|} |
||
=== GPUTEXTURESIZE === |
=== GPUTEXTURESIZE === |
||
Four structures used in the union [[#Size |
Four structures used in the union [[#Size|Size]]. |
||
==== GPUTEXTURESIZE_1D ==== |
==== GPUTEXTURESIZE_1D ==== |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0 || 24 || Width || || |
| 0 || 24 || Width || || |
||
|- |
|- |
||
| 24 || 8 || || |
| 24 || 8 || || Padding || |
||
|} |
|} |
||
==== GPUTEXTURESIZE_2D ==== |
==== GPUTEXTURESIZE_2D ==== |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
||
|- |
|- |
||
Line 160: | Line 155: | ||
| 13 || 13 || Height || || |
| 13 || 13 || Height || || |
||
|- |
|- |
||
| 26 || 6 || || |
| 26 || 6 || || Padding || |
||
|} |
|} |
||
==== GPUTEXTURESIZE_3D ==== |
==== GPUTEXTURESIZE_3D ==== |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments |
||
|- |
|- |
||
Line 177: | Line 171: | ||
==== GPUTEXTURESIZE_STACK ==== |
==== GPUTEXTURESIZE_STACK ==== |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Offsets (bits) !! Length (bits) !! Name !! Description !! Comments |
! Offsets (bits) !! Length (bits) !! Name !! Description !! Comments |
||
|- |
|- |
||
Line 190: | Line 183: | ||
=== Size === |
=== Size === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Length !! Type !! Name !! Description !! Comments |
! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x4 || [[#GPUTEXTURESIZE_1D |
| 0x4 || [[#GPUTEXTURESIZE_1D|GPUTEXTURESIZE_1D]] || OneD || || |
||
|- |
|- |
||
| 0x4 || [[#GPUTEXTURESIZE_2D |
| 0x4 || [[#GPUTEXTURESIZE_2D|GPUTEXTURESIZE_2D]] || TwoD || || |
||
|- |
|- |
||
| 0x4 || [[#GPUTEXTURESIZE_3D |
| 0x4 || [[#GPUTEXTURESIZE_3D|GPUTEXTURESIZE_3D]] || ThreeD || || |
||
|- |
|- |
||
| 0x4 || [[#GPUTEXTURESIZE_STACK |
| 0x4 || [[#GPUTEXTURESIZE_STACK|GPUTEXTURESIZE_STACK]] || Stack || || |
||
|} |
|} |
||
Line 207: | Line 199: | ||
=== D3DRESOURCETYPE === |
=== D3DRESOURCETYPE === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 251: | Line 242: | ||
=== GPUCONSTANTTYPE === |
=== GPUCONSTANTTYPE === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 265: | Line 255: | ||
=== GPUSIGN === |
=== GPUSIGN === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 279: | Line 268: | ||
=== GPUCLAMP === |
=== GPUCLAMP === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 301: | Line 289: | ||
=== GPUMULTISAMPLE_TYPE === |
=== GPUMULTISAMPLE_TYPE === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 315: | Line 302: | ||
=== GPUTEXTUREFORMAT === |
=== GPUTEXTUREFORMAT === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 449: | Line 435: | ||
=== GPUENDIAN === |
=== GPUENDIAN === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 463: | Line 448: | ||
=== GPUREQUESTSIZE === |
=== GPUREQUESTSIZE === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 473: | Line 457: | ||
=== GPUCLAMPPOLICY === |
=== GPUCLAMPPOLICY === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 483: | Line 466: | ||
=== GPUNUMFORMAT === |
=== GPUNUMFORMAT === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 493: | Line 475: | ||
=== GPUSWIZZLE === |
=== GPUSWIZZLE === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 511: | Line 492: | ||
=== GPUMINMAGFILTER === |
=== GPUMINMAGFILTER === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 523: | Line 503: | ||
=== GPUMIPFILTER === |
=== GPUMIPFILTER === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 537: | Line 516: | ||
=== GPUANISOFILTER === |
=== GPUANISOFILTER === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 557: | Line 535: | ||
=== GPUBORDERCOLOR === |
=== GPUBORDERCOLOR === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 571: | Line 548: | ||
=== GPUTRICLAMP === |
=== GPUTRICLAMP === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
Line 585: | Line 561: | ||
=== GPUDIMENSION === |
=== GPUDIMENSION === |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |