diff options
author | marha <marha@users.sourceforge.net> | 2014-10-01 20:47:44 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-10-01 20:47:44 +0200 |
commit | 30eb28e89e513ba7c04e8424be0cba326a01882b (patch) | |
tree | c84d1ffa742ebc6f077abb20a6b80c56ddaea888 /mesalib/src/mesa/drivers/common | |
parent | 438af0c7d4bf60b408b259c88205ff2193195466 (diff) | |
download | vcxsrv-30eb28e89e513ba7c04e8424be0cba326a01882b.tar.gz vcxsrv-30eb28e89e513ba7c04e8424be0cba326a01882b.tar.bz2 vcxsrv-30eb28e89e513ba7c04e8424be0cba326a01882b.zip |
libxtrans pixman fontconfig mesa xserver xkeyboard-config git update 1 Oct 2014
plink 10277
xserver commit d3d845ca9e92f0a2ccde93f4242d7769cfe14164
xkeyboard-config commit 73aa90ce32967747c84a1b5fe32cee329bc3bbcf
pixman commit f078727f392bc9f235df916e75634ed87177b9b4
libxtrans commit 7cbad9fe2e61cd9d5caeaf361826a6f4bd320f03
fontconfig commit 1082161ea303cf2bbc13b62a191662984131e820
mesa commit 4f7916ab4f8093fa33519dfa3d08e73b4d35ebe3
Diffstat (limited to 'mesalib/src/mesa/drivers/common')
-rw-r--r-- | mesalib/src/mesa/drivers/common/meta_blit.c | 33 | ||||
-rw-r--r-- | mesalib/src/mesa/drivers/common/meta_copy_image.c | 9 |
2 files changed, 30 insertions, 12 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta_blit.c b/mesalib/src/mesa/drivers/common/meta_blit.c index fc9848a7a..770bc4178 100644 --- a/mesalib/src/mesa/drivers/common/meta_blit.c +++ b/mesalib/src/mesa/drivers/common/meta_blit.c @@ -70,26 +70,28 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx, const char *sampler_array_suffix = ""; char *name; const char *texcoord_type = "vec2"; - const int samples = MAX2(src_rb->NumSamples, 1); + int samples; int shader_offset = 0; - /* We expect only power of 2 samples in source multisample buffer. */ - assert((samples & (samples - 1)) == 0); - while (samples >> (shader_offset + 1)) { - shader_offset++; - } - /* Update the assert if we plan to support more than 16X MSAA. */ - assert(shader_offset >= 0 && shader_offset <= 4); - if (src_rb) { + samples = MAX2(src_rb->NumSamples, 1); src_datatype = _mesa_get_format_datatype(src_rb->Format); } else { /* depth-or-color glCopyTexImage fallback path that passes a NULL rb and * doesn't handle integer. */ + samples = 1; src_datatype = GL_UNSIGNED_NORMALIZED; } + /* We expect only power of 2 samples in source multisample buffer. */ + assert((samples & (samples - 1)) == 0); + while (samples >> (shader_offset + 1)) { + shader_offset++; + } + /* Update the assert if we plan to support more than 16X MSAA. */ + assert(shader_offset >= 0 && shader_offset <= 4); + if (ctx->DrawBuffer->Visual.samples > 1) { /* If you're calling meta_BlitFramebuffer with the destination * multisampled, this is the only path that will work -- swrast and @@ -108,8 +110,8 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx, switch (target) { case GL_TEXTURE_2D_MULTISAMPLE: case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: - if (src_rb->_BaseFormat == GL_DEPTH_COMPONENT || - src_rb->_BaseFormat == GL_DEPTH_STENCIL) { + if (src_rb && (src_rb->_BaseFormat == GL_DEPTH_COMPONENT || + src_rb->_BaseFormat == GL_DEPTH_STENCIL)) { if (dst_is_msaa) shader_index = BLIT_MSAA_SHADER_2D_MULTISAMPLE_DEPTH_COPY; else @@ -624,13 +626,20 @@ _mesa_meta_bind_rb_as_tex_image(struct gl_context *ctx, GLenum *target) { struct gl_texture_image *texImage; + GLuint tempTex; if (rb->NumSamples > 1) *target = GL_TEXTURE_2D_MULTISAMPLE; else *target = GL_TEXTURE_2D; - _mesa_GenTextures(1, tex); + tempTex = 0; + _mesa_GenTextures(1, &tempTex); + if (tempTex == 0) + return false; + + *tex = tempTex; + _mesa_BindTexture(*target, *tex); *texObj = _mesa_lookup_texture(ctx, *tex); texImage = _mesa_get_tex_image(ctx, *texObj, *target, 0); diff --git a/mesalib/src/mesa/drivers/common/meta_copy_image.c b/mesalib/src/mesa/drivers/common/meta_copy_image.c index 0c204b87d..fc0cbaf1b 100644 --- a/mesalib/src/mesa/drivers/common/meta_copy_image.c +++ b/mesalib/src/mesa/drivers/common/meta_copy_image.c @@ -63,12 +63,21 @@ make_view(struct gl_context *ctx, struct gl_texture_image *tex_image, if (!ctx->Driver.TestProxyTexImage(ctx, tex_obj->Target, 0, tex_format, tex_image->Width, tex_image->Height, tex_image->Depth, 0)) { + _mesa_DeleteTextures(1, view_tex_name); + *view_tex_name = 0; return false; } view_tex_obj->Target = tex_obj->Target; *view_tex_image = _mesa_get_tex_image(ctx, view_tex_obj, tex_obj->Target, 0); + + if (!*view_tex_image) { + _mesa_DeleteTextures(1, view_tex_name); + *view_tex_name = 0; + return false; + } + _mesa_init_teximage_fields(ctx, *view_tex_image, tex_image->Width, tex_image->Height, tex_image->Depth, |