diff options
Diffstat (limited to 'src/gallium/drivers/svga/svga_surface.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_surface.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 3e8fb5f0271..1bcbd3e002b 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -187,6 +187,7 @@ svga_create_surface(struct pipe_context *pipe, struct svga_context *svga = svga_context(pipe); struct svga_texture *tex = svga_texture(pt); struct pipe_screen *screen = pipe->screen; + struct svga_screen *ss = svga_screen(screen); struct svga_surface *s; unsigned face, zslice; /* XXX surfaces should only be used for rendering purposes nowadays */ @@ -224,7 +225,7 @@ svga_create_surface(struct pipe_context *pipe, if (!render) { flags = SVGA3D_SURFACE_HINT_TEXTURE; - format = svga_translate_format(surf_tmpl->format); + format = svga_translate_format(ss, surf_tmpl->format); } else { if (surf_tmpl->usage & PIPE_BIND_RENDER_TARGET) { flags = SVGA3D_SURFACE_HINT_RENDERTARGET; @@ -232,7 +233,7 @@ svga_create_surface(struct pipe_context *pipe, if (surf_tmpl->usage & PIPE_BIND_DEPTH_STENCIL) { flags = SVGA3D_SURFACE_HINT_DEPTHSTENCIL; } - format = svga_translate_format_render(surf_tmpl->format); + format = svga_translate_format_render(ss, surf_tmpl->format); } assert(format != SVGA3D_FORMAT_INVALID); @@ -242,7 +243,7 @@ svga_create_surface(struct pipe_context *pipe, /* Currently only used for compressed textures */ if (render && - format != svga_translate_format(surf_tmpl->format)) { + format != svga_translate_format(ss, surf_tmpl->format)) { view = TRUE; } |