diff options
author | marha <marha@users.sourceforge.net> | 2012-08-13 10:11:17 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-13 10:11:17 +0200 |
commit | f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1 (patch) | |
tree | 921a5a742930124e7bd7e9a7e73f6029bd74338d /mesalib/src/mesa/state_tracker | |
parent | ec4051f308e8e84146e0ecc39b6d228e500e9636 (diff) | |
parent | 9ddf44af81782451cee798e06749ce3067a14a41 (diff) | |
download | vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.gz vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.bz2 vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_fbo.c | 6 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_texture.c | 46 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 5 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_manager.c | 3 |
4 files changed, 34 insertions, 26 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c index 7eef5c659..40e3677f6 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c +++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c @@ -458,6 +458,12 @@ st_render_texture(struct gl_context *ctx, * passed to the pipe as a (color/depth) render target. */ st_invalidate_state(ctx, _NEW_BUFFERS); + + + /* Need to trigger a call to update_framebuffer() since we just + * attached a new renderbuffer. + */ + ctx->NewState |= _NEW_BUFFERS; } diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index a7f57b96f..a7c732bd7 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -415,20 +415,18 @@ guess_and_alloc_texture(struct st_context *st, */ static GLboolean st_AllocTextureImageBuffer(struct gl_context *ctx, - struct gl_texture_image *texImage, - gl_format format, GLsizei width, - GLsizei height, GLsizei depth) + struct gl_texture_image *texImage) { struct st_context *st = st_context(ctx); struct st_texture_image *stImage = st_texture_image(texImage); struct st_texture_object *stObj = st_texture_object(texImage->TexObject); const GLuint level = texImage->Level; + GLuint width = texImage->Width; + GLuint height = texImage->Height; + GLuint depth = texImage->Depth; DBG("%s\n", __FUNCTION__); - assert(width > 0); - assert(height > 0); - assert(depth > 0); assert(!stImage->TexData); assert(!stImage->pt); /* xxx this might be wrong */ @@ -500,8 +498,6 @@ st_AllocTextureImageBuffer(struct gl_context *ctx, */ static void prep_teximage(struct gl_context *ctx, struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type) { struct gl_texture_object *texObj = texImage->TexObject; @@ -518,11 +514,13 @@ prep_teximage(struct gl_context *ctx, struct gl_texture_image *texImage, /* oops, need to init this image again */ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, - internalFormat, format, type); + texImage->InternalFormat, format, + type); _mesa_init_teximage_fields(ctx, texImage, - width, height, depth, border, - internalFormat, texFormat); + texImage->Width, texImage->Height, + texImage->Depth, texImage->Border, + texImage->InternalFormat, texFormat); stObj->surface_based = GL_FALSE; } @@ -532,29 +530,21 @@ prep_teximage(struct gl_context *ctx, struct gl_texture_image *texImage, static void st_TexImage(struct gl_context * ctx, GLuint dims, struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const void *pixels, const struct gl_pixelstore_attrib *unpack) { - prep_teximage(ctx, texImage, internalFormat, width, height, depth, border, - format, type); - _mesa_store_teximage(ctx, dims, texImage, internalFormat, width, height, depth, - border, format, type, pixels, unpack); + prep_teximage(ctx, texImage, format, type); + _mesa_store_teximage(ctx, dims, texImage, format, type, pixels, unpack); } static void st_CompressedTexImage(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint border, GLint depth, GLsizei imageSize, const GLvoid *data) { - prep_teximage(ctx, texImage, internalFormat, width, height, depth, border, - GL_NONE, GL_NONE); - _mesa_store_compressed_teximage(ctx, dims, texImage, internalFormat, width, - height, depth, border, imageSize, data); + prep_teximage(ctx, texImage, GL_NONE, GL_NONE); + _mesa_store_compressed_teximage(ctx, dims, texImage, imageSize, data); } @@ -1004,14 +994,22 @@ st_CopyTexSubImage(struct gl_context *ctx, GLuint dims, !do_flip) { /* use surface_copy() / blit */ struct pipe_box src_box; + unsigned dstLevel; + u_box_2d_zslice(srcX, srcY, strb->surface->u.tex.first_layer, width, height, &src_box); + /* If stImage->pt is an independent image (not a pointer into a full + * mipmap) stImage->pt.last_level will be zero and we need to use that + * as the dest level. + */ + dstLevel = MIN2(stImage->base.Level, stImage->pt->last_level); + /* for resource_copy_region(), y=0=top, always */ pipe->resource_copy_region(pipe, /* dest */ stImage->pt, - stImage->base.Level, + dstLevel, destX, destY, destZ + stImage->base.Face, /* src */ strb->texture, diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 66627acb6..39717b6fd 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1867,6 +1867,10 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) assert(!"GLSL 1.30 features unsupported"); break; + case ir_binop_ubo_load: + assert(!"not yet supported"); + break; + case ir_quadop_vector: /* This operation should have already been handled. */ @@ -4174,6 +4178,7 @@ translate_tex_offset(struct st_translate *t, offset.SwizzleX = in_offset->SwizzleX; offset.SwizzleY = in_offset->SwizzleY; offset.SwizzleZ = in_offset->SwizzleZ; + offset.Padding = 0; return offset; } diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c index 875e0c44a..5142eb2dd 100644 --- a/mesalib/src/mesa/state_tracker/st_manager.c +++ b/mesalib/src/mesa/state_tracker/st_manager.c @@ -652,8 +652,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, * yet enforce the added restrictions of a forward-looking context, so * fail that too. */ - if (st->ctx->VersionMajor * 10 + st->ctx->VersionMinor < - attribs->major * 10 + attribs->minor + if (st->ctx->Version < attribs->major * 10 + attribs->minor || (attribs->flags & ~ST_CONTEXT_FLAG_DEBUG) != 0) { *error = ST_CONTEXT_ERROR_BAD_VERSION; st_destroy_context(st); |