diff options
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r-- | mesalib/src/mesa/main/pack.c | 23 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_extensions.c | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_texture.c | 5 |
3 files changed, 27 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/pack.c b/mesalib/src/mesa/main/pack.c index fd3f89d82..8388708a4 100644 --- a/mesalib/src/mesa/main/pack.c +++ b/mesalib/src/mesa/main/pack.c @@ -506,6 +506,13 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4], luminance = NULL; } + /* EXT_texture_integer specifies no transfer ops on integer + * types in the resolved issues section. Just set them to 0 + * for integer surfaces. + */ + if (intDstFormat) + transferOps = 0; + if (transferOps) { _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba); } @@ -3452,6 +3459,7 @@ _mesa_unpack_color_span_chan( struct gl_context *ctx, const struct gl_pixelstore_attrib *srcPacking, GLbitfield transferOps ) { + GLboolean intFormat = _mesa_is_integer_format(srcFormat); ASSERT(dstFormat == GL_ALPHA || dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA || @@ -3500,6 +3508,13 @@ _mesa_unpack_color_span_chan( struct gl_context *ctx, srcType == GL_UNSIGNED_INT_5_9_9_9_REV || srcType == GL_UNSIGNED_INT_10F_11F_11F_REV); + /* EXT_texture_integer specifies no transfer ops on integer + * types in the resolved issues section. Just set them to 0 + * for integer surfaces. + */ + if (intFormat) + transferOps = 0; + /* Try simple cases first */ if (transferOps == 0) { if (srcType == CHAN_TYPE) { @@ -3815,6 +3830,7 @@ _mesa_unpack_color_span_float( struct gl_context *ctx, GLint dstComponents; GLint rDst, gDst, bDst, aDst, lDst, iDst; GLfloat (*rgba)[4] = (GLfloat (*)[4]) malloc(4 * n * sizeof(GLfloat)); + GLboolean intFormat = _mesa_is_integer_format(srcFormat); if (!rgba) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "pixel unpacking"); @@ -3825,6 +3841,13 @@ _mesa_unpack_color_span_float( struct gl_context *ctx, /* source & dest image formats should have been error checked by now */ assert(dstComponents > 0); + /* EXT_texture_integer specifies no transfer ops on integer + * types in the resolved issues section. Just set them to 0 + * for integer surfaces. + */ + if (intFormat) + transferOps = 0; + /* * Extract image data and convert to RGBA floats */ diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index 0ad9e1286..722db8d77 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -176,8 +176,8 @@ void st_init_limits(struct st_context *st) /* Gallium doesn't really care about local vs. env parameters so use the * same limits. */ - pc->MaxLocalParams = pc->MaxParameters; - pc->MaxEnvParams = pc->MaxParameters; + pc->MaxLocalParams = MIN2(pc->MaxParameters, MAX_PROGRAM_LOCAL_PARAMS); + pc->MaxEnvParams = MIN2(pc->MaxParameters, MAX_PROGRAM_ENV_PARAMS); options->EmitNoNoise = TRUE; diff --git a/mesalib/src/mesa/state_tracker/st_texture.c b/mesalib/src/mesa/state_tracker/st_texture.c index 232c286c1..c5dc7dcc4 100644 --- a/mesalib/src/mesa/state_tracker/st_texture.c +++ b/mesalib/src/mesa/state_tracker/st_texture.c @@ -72,9 +72,8 @@ st_texture_create(struct st_context *st, if (target == PIPE_TEXTURE_CUBE) assert(layers == 6); - DBG("%s target %s format %s last_level %d\n", __FUNCTION__, - _mesa_lookup_enum_by_nr(target), - _mesa_lookup_enum_by_nr(format), last_level); + DBG("%s target %d format %s last_level %d\n", __FUNCTION__, + (int) target, util_format_name(format), last_level); assert(format); assert(screen->is_format_supported(screen, format, target, 0, |