aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-03-25 10:23:25 +0100
committermarha <marha@users.sourceforge.net>2013-03-25 10:23:25 +0100
commit30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea (patch)
tree7ae924e3fb64c93a0f59e55fd08a914db9bb551b /mesalib/src/mesa/drivers
parent55a9a54c65cd0ff58966408ea4d7879a3d9c749c (diff)
parent176eab9e8277db1549bfc6c9ae805c4e1858f0b0 (diff)
downloadvcxsrv-30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea.tar.gz
vcxsrv-30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea.tar.bz2
vcxsrv-30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa pixman xserver git update 25 Mar 2013
Diffstat (limited to 'mesalib/src/mesa/drivers')
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c15
-rw-r--r--mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h5
2 files changed, 15 insertions, 5 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 29a209ede..8114550ba 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -3118,6 +3118,7 @@ setup_texture_coords(GLenum faceTarget,
GLint slice,
GLint width,
GLint height,
+ GLint depth,
GLfloat coords0[3],
GLfloat coords1[3],
GLfloat coords2[3],
@@ -3134,8 +3135,11 @@ setup_texture_coords(GLenum faceTarget,
case GL_TEXTURE_2D:
case GL_TEXTURE_3D:
case GL_TEXTURE_2D_ARRAY:
- if (faceTarget == GL_TEXTURE_3D)
- r = 1.0F / slice;
+ if (faceTarget == GL_TEXTURE_3D) {
+ assert(slice < depth);
+ assert(depth >= 1);
+ r = (slice + 0.5f) / depth;
+ }
else if (faceTarget == GL_TEXTURE_2D_ARRAY)
r = slice;
else
@@ -3571,10 +3575,10 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
else
assert(!genMipmapSave);
- /* Setup texture coordinates */
+ /* Setup texture coordinates */
setup_texture_coords(faceTarget,
slice,
- 0, 0, /* width, height never used here */
+ 0, 0, 1, /* width, height never used here */
verts[0].tex,
verts[1].tex,
verts[2].tex,
@@ -3840,6 +3844,7 @@ decompress_texture_image(struct gl_context *ctx,
struct gl_texture_object *texObj = texImage->TexObject;
const GLint width = texImage->Width;
const GLint height = texImage->Height;
+ const GLint depth = texImage->Height;
const GLenum target = texObj->Target;
GLenum faceTarget;
struct vertex {
@@ -3935,7 +3940,7 @@ decompress_texture_image(struct gl_context *ctx,
_mesa_BindSampler(ctx->Texture.CurrentUnit, decompress->Sampler);
}
- setup_texture_coords(faceTarget, slice, width, height,
+ setup_texture_coords(faceTarget, slice, width, height, depth,
verts[0].tex,
verts[1].tex,
verts[2].tex,
diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h b/mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h
index 1e7eced06..7b441c68f 100644
--- a/mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h
+++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/t_options.h
@@ -75,6 +75,11 @@ DRI_CONF_OPT_BEGIN(always_flush_cache,bool,def) \
DRI_CONF_DESC(en,gettext("Enable flushing GPU caches with each draw call")) \
DRI_CONF_OPT_END
+#define DRI_CONF_DISABLE_THROTTLING(def) \
+DRI_CONF_OPT_BEGIN(disable_throttling,bool,def) \
+ DRI_CONF_DESC(en,gettext("Disable throttling on first batch after flush")) \
+DRI_CONF_OPT_END
+
#define DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(def) \
DRI_CONF_OPT_BEGIN(force_glsl_extensions_warn,bool,def) \
DRI_CONF_DESC(en,gettext("Force GLSL extension default behavior to 'warn'")) \