[Mesa-dev] [PATCH] i915: Set swrast_texture_image::Buffer and ::Map during swrast mapping
brianp at vmware.com
Thu Feb 16 17:29:20 PST 2012
On 02/16/2012 04:48 PM, Eric Anholt wrote:
> On Tue, 14 Feb 2012 10:57:17 -0800, "Ian Romanick"<idr at freedesktop.org> wrote:
>> From: Ian Romanick<ian.d.romanick at intel.com>
>> Before calling _tnl_run_pipeline, the i915 driver maps all textures
>> used in vertex shaders (via intel_tex_map_images). Later run_vp tries
>> to map the textures again (via _swrast_map_texture). However, this
>> just replaces the actual mappings with NULL pointers. When the
>> pointers are dereferened, a segfault occurs.
>> Setting swrast_texture_image::Buffer in intel_tex_map_images works
>> around the problem, but I have a hard time believing this is the right
> Seems to me like the swrast map-things-for-texturing should be using
> MapTextureImage. Then we wouldn't need the intel
> pre-_tnl_run_pipeline() mapping.
I may have been too hasty with commit
4bbab2275f792553f8ed6bcebfe6acc4cb4179c2 which removed some tex image
mapping code from tnl.
The tnl module should probably call ctx->Driver.MapTextureImage() for
the vertex textures that it needs, like Eric says.
More information about the mesa-dev