aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-22 08:28:32 +0200
committermarha <marha@users.sourceforge.net>2012-10-22 08:28:32 +0200
commit34d741a3fc96c9424ffec29b114a1bdfde40f8b0 (patch)
treed879a3545ce91989c4fa621001eb7a44b2244cec /mesalib/src/mesa/state_tracker
parentded57b5a4131a213d57f5a20d50b819b7a8924df (diff)
downloadvcxsrv-34d741a3fc96c9424ffec29b114a1bdfde40f8b0.tar.gz
vcxsrv-34d741a3fc96c9424ffec29b114a1bdfde40f8b0.tar.bz2
vcxsrv-34d741a3fc96c9424ffec29b114a1bdfde40f8b0.zip
libX11 mesa pixman git update 22 oct 2012
libX11: f2a8def423a46d52e834cf7ea49fa0079427663a mesa: 259fc154f1fdcabbc0a6c02c524962b063f9dee6 pixman: 31e5a0a393defb8e0534ab1bde29ab23fc04795d
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_msaa.c3
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c8
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c3
3 files changed, 11 insertions, 3 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_msaa.c b/mesalib/src/mesa/state_tracker/st_atom_msaa.c
index ea9eb9a6d..9baa4fcf2 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_msaa.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_msaa.c
@@ -51,7 +51,8 @@ static void update_sample_mask( struct st_context *st )
/* unlike in gallium/d3d10 the mask is only active if msaa is enabled */
if (st->ctx->Multisample.SampleCoverage) {
unsigned nr_bits;
- nr_bits = st->ctx->Multisample.SampleCoverageValue * (float)sample_count;
+ nr_bits = (unsigned)
+ (st->ctx->Multisample.SampleCoverageValue * (float)sample_count);
/* there's lot of ways how to do this. We just use first few bits,
since we have no knowledge of sample positions here. When
app-supplied mask though is used too might need to be smarter.
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index 5bf3dc699..b19dc67bf 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -375,6 +375,8 @@ guess_and_alloc_texture(struct st_context *st,
*/
if ((stObj->base.Sampler.MinFilter == GL_NEAREST ||
stObj->base.Sampler.MinFilter == GL_LINEAR ||
+ (stObj->base.BaseLevel == 0 &&
+ stObj->base.MaxLevel == 0) ||
stImage->base._BaseFormat == GL_DEPTH_COMPONENT ||
stImage->base._BaseFormat == GL_DEPTH_STENCIL_EXT) &&
!stObj->base.GenerateMipmap &&
@@ -1111,11 +1113,15 @@ copy_image_data_to_texture(struct st_context *st,
/* Copy potentially with the blitter:
*/
GLuint src_level;
- if (stImage->pt != stObj->pt)
+ if (stImage->pt->last_level == 0)
src_level = 0;
else
src_level = stImage->base.Level;
+ assert(src_level <= stImage->pt->last_level);
+ assert(u_minify(stImage->pt->width0, src_level) == stImage->base.Width);
+ assert(u_minify(stImage->pt->height0, src_level) == stImage->base.Height);
+
st_texture_image_copy(st->pipe,
stObj->pt, dstLevel, /* dest texture, level */
stImage->pt, src_level, /* src texture, level */
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index 08a41c3e2..0560f3a8a 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -298,7 +298,8 @@ static void init_format_extensions(struct st_context *st,
{
struct pipe_screen *screen = st->pipe->screen;
GLboolean *extensions = (GLboolean *) &st->ctx->Extensions;
- int i, j;
+ unsigned i;
+ int j;
int num_formats = Elements(mapping->format);
int num_ext = Elements(mapping->extension_offset);