diff options
author | marha <marha@users.sourceforge.net> | 2011-05-09 09:35:45 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-05-09 09:35:45 +0000 |
commit | 43b2398ee28e9144fd51eb9994d67c4c9a198c9c (patch) | |
tree | af05c516b61241b6444059697ce94eee092ba8ff /mesalib/src/mesa/main/samplerobj.c | |
parent | 151019725213fc50a8aa4db8c4524387fea8f476 (diff) | |
download | vcxsrv-43b2398ee28e9144fd51eb9994d67c4c9a198c9c.tar.gz vcxsrv-43b2398ee28e9144fd51eb9994d67c4c9a198c9c.tar.bz2 vcxsrv-43b2398ee28e9144fd51eb9994d67c4c9a198c9c.zip |
libXext libX11 mkfontscale mesa git update 9 May 2011
Diffstat (limited to 'mesalib/src/mesa/main/samplerobj.c')
-rw-r--r-- | mesalib/src/mesa/main/samplerobj.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/samplerobj.c b/mesalib/src/mesa/main/samplerobj.c index 4a28c917c..229267f8c 100644 --- a/mesalib/src/mesa/main/samplerobj.c +++ b/mesalib/src/mesa/main/samplerobj.c @@ -133,6 +133,7 @@ _mesa_init_sampler_object(struct gl_sampler_object *sampObj, GLuint name) sampObj->CompareFunc = GL_LEQUAL; sampObj->CompareFailValue = 0.0; sampObj->sRGBDecode = GL_FALSE; + sampObj->CubeMapSeamless = GL_FALSE; sampObj->DepthMode = 0; } @@ -567,6 +568,25 @@ set_sampler_max_anisotropy(struct gl_context *ctx, } +static GLuint +set_sampler_cube_map_seamless(struct gl_context *ctx, + struct gl_sampler_object *samp, GLboolean param) +{ + if (!ctx->Extensions.AMD_seamless_cubemap_per_texture) + return INVALID_PNAME; + + if (samp->CubeMapSeamless == param) + return GL_FALSE; + + if (param != GL_TRUE && param != GL_FALSE) + return INVALID_VALUE; + + flush(ctx); + samp->CubeMapSeamless = param; + return GL_TRUE; +} + + static void GLAPIENTRY _mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param) { @@ -615,6 +635,9 @@ _mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param) case GL_TEXTURE_MAX_ANISOTROPY_EXT: res = set_sampler_max_anisotropy(ctx, sampObj, (GLfloat) param); break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + res = set_sampler_cube_map_seamless(ctx, sampObj, param); + break; case GL_TEXTURE_BORDER_COLOR: /* fall-through */ default: @@ -696,6 +719,9 @@ _mesa_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) case GL_TEXTURE_MAX_ANISOTROPY_EXT: res = set_sampler_max_anisotropy(ctx, sampObj, param); break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + res = set_sampler_cube_map_seamless(ctx, sampObj, (GLboolean) param); + break; case GL_TEXTURE_BORDER_COLOR: /* fall-through */ default: @@ -774,6 +800,9 @@ _mesa_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params) case GL_TEXTURE_MAX_ANISOTROPY_EXT: res = set_sampler_max_anisotropy(ctx, sampObj, (GLfloat) params[0]); break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + res = set_sampler_cube_map_seamless(ctx, sampObj, params[0]); + break; case GL_TEXTURE_BORDER_COLOR: { GLfloat c[4]; @@ -862,6 +891,9 @@ _mesa_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params) case GL_TEXTURE_MAX_ANISOTROPY_EXT: res = set_sampler_max_anisotropy(ctx, sampObj, params[0]); break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + res = set_sampler_cube_map_seamless(ctx, sampObj, (GLboolean) params[0]); + break; case GL_TEXTURE_BORDER_COLOR: res = set_sampler_border_colorf(ctx, sampObj, params); break; @@ -941,6 +973,9 @@ _mesa_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params) case GL_TEXTURE_MAX_ANISOTROPY_EXT: res = set_sampler_max_anisotropy(ctx, sampObj, (GLfloat) params[0]); break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + res = set_sampler_cube_map_seamless(ctx, sampObj, params[0]); + break; case GL_TEXTURE_BORDER_COLOR: res = set_sampler_border_colori(ctx, sampObj, params); break; @@ -1021,6 +1056,9 @@ _mesa_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params) case GL_TEXTURE_MAX_ANISOTROPY_EXT: res = set_sampler_max_anisotropy(ctx, sampObj, (GLfloat) params[0]); break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + res = set_sampler_cube_map_seamless(ctx, sampObj, params[0]); + break; case GL_TEXTURE_BORDER_COLOR: res = set_sampler_border_colorui(ctx, sampObj, params); break; @@ -1110,6 +1148,11 @@ _mesa_GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) params[2] = FLOAT_TO_INT(sampObj->BorderColor.f[2]); params[3] = FLOAT_TO_INT(sampObj->BorderColor.f[3]); break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + if (!ctx->Extensions.AMD_seamless_cubemap_per_texture) + goto invalid_pname; + *params = sampObj->CubeMapSeamless; + break; default: goto invalid_pname; } @@ -1178,6 +1221,11 @@ _mesa_GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params) params[2] = sampObj->BorderColor.f[2]; params[3] = sampObj->BorderColor.f[3]; break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + if (!ctx->Extensions.AMD_seamless_cubemap_per_texture) + goto invalid_pname; + *params = (GLfloat) sampObj->CubeMapSeamless; + break; default: goto invalid_pname; } @@ -1247,6 +1295,11 @@ _mesa_GetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params) params[2] = sampObj->BorderColor.i[2]; params[3] = sampObj->BorderColor.i[3]; break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + if (!ctx->Extensions.AMD_seamless_cubemap_per_texture) + goto invalid_pname; + *params = sampObj->CubeMapSeamless; + break; default: goto invalid_pname; } @@ -1316,6 +1369,11 @@ _mesa_GetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params) params[2] = sampObj->BorderColor.ui[2]; params[3] = sampObj->BorderColor.ui[3]; break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + if (!ctx->Extensions.AMD_seamless_cubemap_per_texture) + goto invalid_pname; + *params = sampObj->CubeMapSeamless; + break; default: goto invalid_pname; } |