nvc0: use format from the template on surface creation
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 12 Feb 2011 17:50:03 +0000 (18:50 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Wed, 16 Feb 2011 14:45:30 +0000 (15:45 +0100)
Fixes piglit/fbo-srgb.

src/gallium/drivers/nvc0/nvc0_miptree.c

index 22f48c8a5fe0b800c146f3e87b678bd7c9109922..ea3ed9e02251884188d2a6d21466a7c04a862d20 100644 (file)
@@ -283,7 +283,7 @@ nvc0_miptree_surface_new(struct pipe_context *pipe,
    pipe_reference_init(&ps->reference, 1);
    pipe_resource_reference(&ps->texture, pt);
    ps->context = pipe;
-   ps->format = pt->format;
+   ps->format = templ->format;
    ps->usage = templ->usage;
    ps->u.tex.level = templ->u.tex.level;
    ps->u.tex.first_layer = templ->u.tex.first_layer;