diff options
author | Marek Olšák <[email protected]> | 2011-05-03 11:37:25 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-05-06 20:06:30 +0200 |
commit | a19c42ffc606b594558a0c4f981662442ad6bb83 (patch) | |
tree | 1f4e5bd7d8912f8bd135cc67124e7116ce1590ed /src/mesa/main/texparam.c | |
parent | 3b20a89941fe9c7b5ad10e13cb035d0508c43bbd (diff) |
mesa: implement AMD_seamless_cubemap_per_texture
Diffstat (limited to 'src/mesa/main/texparam.c')
-rw-r--r-- | src/mesa/main/texparam.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index f86a8cff7a1..4b9dcb5d3b5 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -439,6 +439,20 @@ set_tex_parameteri(struct gl_context *ctx, } goto invalid_pname; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + if (ctx->Extensions.AMD_seamless_cubemap_per_texture) { + GLenum param = params[0]; + if (param != GL_TRUE && param != GL_FALSE) { + goto invalid_param; + } + if (param != texObj->Sampler.CubeMapSeamless) { + flush(ctx); + texObj->Sampler.CubeMapSeamless = param; + } + return GL_TRUE; + } + goto invalid_pname; + default: goto invalid_pname; } @@ -580,6 +594,7 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param) case GL_TEXTURE_COMPARE_FUNC_ARB: case GL_DEPTH_TEXTURE_MODE_ARB: case GL_TEXTURE_SRGB_DECODE_EXT: + case GL_TEXTURE_CUBE_MAP_SEAMLESS: { /* convert float param to int */ GLint p[4]; @@ -629,6 +644,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) case GL_TEXTURE_COMPARE_FUNC_ARB: case GL_DEPTH_TEXTURE_MODE_ARB: case GL_TEXTURE_SRGB_DECODE_EXT: + case GL_TEXTURE_CUBE_MAP_SEAMLESS: { /* convert float param to int */ GLint p[4]; @@ -1235,6 +1251,14 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) } break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + if (ctx->Extensions.AMD_seamless_cubemap_per_texture) { + *params = (GLfloat) obj->Sampler.CubeMapSeamless; + } + else { + error = GL_TRUE; + } + default: error = GL_TRUE; break; @@ -1396,6 +1420,14 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) } break; + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + if (ctx->Extensions.AMD_seamless_cubemap_per_texture) { + *params = (GLint) obj->Sampler.CubeMapSeamless; + } + else { + error = GL_TRUE; + } + default: ; /* silence warnings */ } |