[Mesa-dev] [RFC PATCH 09/26] wire up GL_TEXTURE_SAMPLES and GL_TEXTURE_FIXED_SAMPLE_LOCATIONS

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


Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/main/texparam.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index c141992..c54ead3 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1119,6 +1119,19 @@ get_tex_level_parameter_image(struct gl_context *ctx,
 	    *params = GL_NONE;
          break;
 
+      /* GL_ARB_texture_multisample */
+      case GL_TEXTURE_SAMPLES:
+         if (!ctx->Extensions.ARB_texture_multisample)
+            goto invalid_pname;
+         *params = texObj->NumSamples;
+         break;
+
+      case GL_TEXTURE_FIXED_SAMPLE_LOCATIONS:
+         if (!ctx->Extensions.ARB_texture_multisample)
+            goto invalid_pname;
+         *params = texObj->FixedSampleLocations;
+         break;
+
       default:
          goto invalid_pname;
    }
-- 
1.8.0.3



More information about the mesa-dev mailing list