diff options
author | Axel Davy <[email protected]> | 2015-02-19 16:18:00 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2015-04-29 08:28:11 +0200 |
commit | e558ce98f2b01e11ff79c29efaea2877121ae04a (patch) | |
tree | 1364f1700df4181d4108a543bbbdc449f8d0adba /src/gallium/state_trackers/nine/basetexture9.h | |
parent | 35fe920e1ec877d487e5dd33c9aea7e1ec1dbe11 (diff) |
st/nine: Encapsulate variables for MANAGED resource
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/basetexture9.h')
-rw-r--r-- | src/gallium/state_trackers/nine/basetexture9.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/nine/basetexture9.h b/src/gallium/state_trackers/nine/basetexture9.h index 006277104a0..7a091bf2578 100644 --- a/src/gallium/state_trackers/nine/basetexture9.h +++ b/src/gallium/state_trackers/nine/basetexture9.h @@ -38,17 +38,20 @@ struct NineBaseTexture9 D3DFORMAT format; - D3DTEXTUREFILTERTYPE mipfilter; - DWORD lod; - DWORD lod_resident; - int16_t bind_count; /* to Device9->state.texture */ boolean shadow; uint8_t pstype; /* 0: 2D, 1: 1D, 2: CUBE, 3: 3D */ - boolean dirty; boolean dirty_mip; + D3DTEXTUREFILTERTYPE mipfilter; + + /* Specific to managed textures */ + struct { + boolean dirty; + DWORD lod; + DWORD lod_resident; + } managed; }; static INLINE struct NineBaseTexture9 * NineBaseTexture9( void *data ) @@ -108,9 +111,9 @@ static INLINE void NineBaseTexture9_Validate( struct NineBaseTexture9 *This ) { DBG_FLAG(DBG_BASETEXTURE, "This=%p dirty=%i dirty_mip=%i lod=%u/%u\n", - This, This->dirty, This->dirty_mip, This->lod, This->lod_resident); + This, This->managed.dirty, This->dirty_mip, This->managed.lod, This->managed.lod_resident); if ((This->base.pool == D3DPOOL_MANAGED) && - (This->dirty || This->lod != This->lod_resident)) + (This->managed.dirty || This->managed.lod != This->managed.lod_resident)) NineBaseTexture9_UploadSelf(This); if (This->dirty_mip) NineBaseTexture9_GenerateMipSubLevels(This); @@ -133,7 +136,7 @@ NineBaseTexture9_Dump( struct NineBaseTexture9 *This ) { } #endif #define BASETEX_REGISTER_UPDATE(t) do { \ - if (((t)->dirty | ((t)->dirty_mip)) && (t)->base.base.bind) \ + if (((t)->managed.dirty | ((t)->dirty_mip)) && (t)->base.base.bind) \ if (LIST_IS_EMPTY(&(t)->list)) \ list_add(&(t)->list, &(t)->base.base.device->update_textures); \ } while(0) |