summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/svga_sampler_view.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2011-02-18 19:03:08 +0000
committerJosé Fonseca <jfonseca@vmware.com>2011-02-18 19:03:43 +0000
commite16e70610c459721f4344dc6e61a8af1c2ad870d (patch)
tree41d045b6e3a3de47a9a27098df311e00d1039c4a /src/gallium/drivers/svga/svga_sampler_view.c
parent7ea729a1855e93b3c41c72781950f8612221fd5c (diff)
svga: Fix NULL dereference.
Probably introduced with the surface view move from screen to context.
Diffstat (limited to 'src/gallium/drivers/svga/svga_sampler_view.c')
-rw-r--r--src/gallium/drivers/svga/svga_sampler_view.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_sampler_view.c b/src/gallium/drivers/svga/svga_sampler_view.c
index 4d9ac6c324..49cae2d44f 100644
--- a/src/gallium/drivers/svga/svga_sampler_view.c
+++ b/src/gallium/drivers/svga/svga_sampler_view.c
@@ -55,7 +55,8 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
struct pipe_resource *pt,
unsigned min_lod, unsigned max_lod)
{
- struct svga_screen *ss = svga_screen(pt->screen);
+ struct svga_context *svga = svga_context(pipe);
+ struct svga_screen *ss = svga_screen(pipe->screen);
struct svga_texture *tex = svga_texture(pt);
struct svga_sampler_view *sv = NULL;
SVGA3dSurfaceFlags flags = SVGA3D_SURFACE_HINT_TEXTURE;
@@ -138,7 +139,7 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
pt->last_level);
sv->age = tex->age;
- sv->handle = svga_texture_view_surface(pipe, tex, flags, format,
+ sv->handle = svga_texture_view_surface(svga, tex, flags, format,
min_lod,
max_lod - min_lod + 1,
-1, -1,