Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:linux4humans:cryptocurrencies
Mesa
0001-Fix-crash-in-swrast-when-setting-a-texture...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch of Package Mesa
From 761ca4b98dfe7440402aa8e24defc2c881975f07 Mon Sep 17 00:00:00 2001 From: Egbert Eich <eich@suse.de> Date: Fri, 5 Nov 2010 08:00:12 +0100 Subject: [PATCH] Fix crash in swrast when setting a texture for a pixmap. When getImage() is called in swrastSetTexBuffer2() there will be a crash somewhere down the line since texImage->Data isn't initialized which holds a pointer to the destination. To initialize texImage->Data we call ctx->Driver.TexImage2D(). --- Mesa-7.9/src/mesa/drivers/dri/swrast/swrast.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/Mesa-7.9/src/mesa/drivers/dri/swrast/swrast.c b/Mesa-7.9/src/mesa/drivers/dri/swrast/swrast.c index ff53ffd..233f225 100644 --- a/Mesa-7.9/src/mesa/drivers/dri/swrast/swrast.c +++ b/Mesa-7.9/src/mesa/drivers/dri/swrast/swrast.c @@ -62,6 +62,7 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format, __DRIdrawable *dPriv) { + GET_CURRENT_CONTEXT(ctx); struct dri_context *dri_ctx; int x, y, w, h; __DRIscreen *sPriv = dPriv->driScreenPriv; @@ -92,6 +93,10 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, _mesa_set_fetch_functions(texImage, 2); + ctx->Driver.TexImage2D(ctx, target, 0, internalFormat, + w, h, 0, texture_format, GL_UNSIGNED_INT_8_8_8_8, + NULL, &ctx->Unpack, texObj, texImage); + sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)texImage->Data, dPriv->loaderPrivate); -- 1.7.3.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor