aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_fbo.c1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c36
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c13
3 files changed, 6 insertions, 44 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
index 05139ec5a..4d321587f 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
@@ -381,6 +381,7 @@ st_render_texture(struct gl_context *ctx,
rb->Width = texImage->Width2;
rb->Height = texImage->Height2;
rb->_BaseFormat = texImage->_BaseFormat;
+ rb->InternalFormat = texImage->InternalFormat;
/*printf("***** render to texture level %d: %d x %d\n", att->TextureLevel, rb->Width, rb->Height);*/
/*printf("***** pipe texture %d x %d\n", pt->width0, pt->height0);*/
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index 8df753f7c..260df09f5 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -922,8 +922,7 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level,
/**
- * Need to map texture image into memory before copying image data,
- * then unmap it.
+ * Called via ctx->Driver.GetTexImage()
*/
static void
st_GetTexImage(struct gl_context * ctx, GLenum target, GLint level,
@@ -931,46 +930,21 @@ st_GetTexImage(struct gl_context * ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- struct st_context *st = st_context(ctx);
struct st_texture_image *stImage = st_texture_image(texImage);
- const GLuint dstImageStride =
- _mesa_image_image_stride(&ctx->Pack, texImage->Width, texImage->Height,
- format, type);
- GLuint depth, i;
- GLubyte *dest;
if (stImage->pt && util_format_is_s3tc(stImage->pt->format)) {
/* Need to decompress the texture.
- * We'll do this by rendering a textured quad.
+ * We'll do this by rendering a textured quad (which is hopefully
+ * faster than using the fallback code in texcompress.c.
* Note that we only expect RGBA formats (no Z/depth formats).
*/
decompress_with_blit(ctx, target, level, format, type, pixels,
texObj, texImage);
- return;
}
-
- depth = texImage->Depth;
- texImage->Depth = 1;
-
- dest = (GLubyte *) pixels;
-
- for (i = 0; i < depth; i++) {
- _mesa_get_teximage(ctx, target, level, format, type, dest,
+ else {
+ _mesa_get_teximage(ctx, target, level, format, type, pixels,
texObj, texImage);
-
- if (stImage->pt && i + 1 < depth) {
- /* unmap this slice */
- st_texture_image_unmap(st, stImage);
- /* map next slice of 3D texture */
- texImage->Data = st_texture_image_map(st, stImage, i + 1,
- PIPE_TRANSFER_READ, 0, 0,
- stImage->base.Width,
- stImage->base.Height);
- dest += dstImageStride;
- }
}
-
- texImage->Depth = depth;
}
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index e6572c85a..27fff39a8 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -267,7 +267,6 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.EXT_blend_color = GL_TRUE;
ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
ctx->Extensions.EXT_blend_minmax = GL_TRUE;
- ctx->Extensions.EXT_blend_subtract = GL_TRUE;
ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
@@ -277,11 +276,7 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.EXT_point_parameters = GL_TRUE;
ctx->Extensions.EXT_provoking_vertex = GL_TRUE;
ctx->Extensions.EXT_secondary_color = GL_TRUE;
- ctx->Extensions.EXT_stencil_wrap = GL_TRUE;
- ctx->Extensions.EXT_texture_env_add = GL_TRUE;
- ctx->Extensions.EXT_texture_env_combine = GL_TRUE;
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
- ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
ctx->Extensions.APPLE_vertex_array_object = GL_TRUE;
@@ -327,10 +322,6 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.EXT_separate_shader_objects = GL_TRUE;
}
- if (screen->get_param(screen, PIPE_CAP_TEXTURE_MIRROR_REPEAT) > 0) {
- ctx->Extensions.ARB_texture_mirrored_repeat = GL_TRUE;
- }
-
if (screen->get_param(screen, PIPE_CAP_BLEND_EQUATION_SEPARATE)) {
ctx->Extensions.EXT_blend_equation_separate = GL_TRUE;
}
@@ -344,10 +335,6 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
}
- if (screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS) > 1) {
- ctx->Extensions.ARB_multitexture = GL_TRUE;
- }
-
if (screen->get_param(screen, PIPE_CAP_TWO_SIDED_STENCIL)) {
ctx->Extensions.ATI_separate_stencil = GL_TRUE;
ctx->Extensions.EXT_stencil_two_side = GL_TRUE;