From e558ce98f2b01e11ff79c29efaea2877121ae04a Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Thu, 19 Feb 2015 16:18:00 +0100 Subject: st/nine: Encapsulate variables for MANAGED resource Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/basetexture9.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/gallium/state_trackers/nine/basetexture9.h') 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) -- cgit v1.2.3