[Mesa-dev] [RFC PATCH 06/26] mesa: add new texture state for ARB_texture_multisample

Chris Forbes chrisf at ijw.co.nz
Sat Dec 29 04:35:19 PST 2012


Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/main/mtypes.h | 4 ++++
 src/mesa/main/texobj.c | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index db87ead..4be1074 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1302,6 +1302,10 @@ struct gl_texture_object
 
    /** GL_OES_EGL_image_external */
    GLint RequiredTextureImageUnits;
+
+   /** GL_ARB_texture_multisample */
+   GLuint NumSamples;               /**< Sample count, or 0 for non-multisample */
+   GLboolean FixedSampleLocations;  /**< Same sample locations for all pixels? */
 };
 
 
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 4173a7f..1364d70 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -157,6 +157,9 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
    obj->Sampler.sRGBDecode = GL_DECODE_EXT;
    obj->BufferObjectFormat = GL_LUMINANCE8;
    obj->_BufferObjectFormat = MESA_FORMAT_L8;
+
+   obj->NumSamples = 0;
+   obj->FixedSampleLocations = GL_TRUE;
 }
 
 
-- 
1.8.0.3



More information about the mesa-dev mailing list