summaryrefslogtreecommitdiff
path: root/src/gallium/tests/trivial/tri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/tests/trivial/tri.c')
-rw-r--r--src/gallium/tests/trivial/tri.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/tests/trivial/tri.c b/src/gallium/tests/trivial/tri.c
index 667a27b28a..37c1573051 100644
--- a/src/gallium/tests/trivial/tri.c
+++ b/src/gallium/tests/trivial/tri.c
@@ -87,6 +87,7 @@ struct program
static void init_prog(struct program *p)
{
+ struct pipe_surface surf_tmpl;
/* create the software rasterizer */
p->screen = sw_screen_create(null_sw_create());
/* wrap the screen with any debugger */
@@ -132,6 +133,7 @@ static void init_prog(struct program *p)
tmplt.width0 = WIDTH;
tmplt.height0 = HEIGHT;
tmplt.depth0 = 1;
+ tmplt.array_size = 1;
tmplt.last_level = 0;
tmplt.bind = PIPE_BIND_RENDER_TARGET;
@@ -150,12 +152,17 @@ static void init_prog(struct program *p)
p->rasterizer.cull_face = PIPE_FACE_NONE;
p->rasterizer.gl_rasterization_rules = 1;
+ surf_tmpl.format = templat.format;
+ surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
+ surf_tmpl.u.tex.level = 0;
+ surf_tmpl.u.tex.first_layer = 0;
+ surf_tmpl.u.tex.last_layer = 0;
/* drawing destination */
memset(&p->framebuffer, 0, sizeof(p->framebuffer));
p->framebuffer.width = WIDTH;
p->framebuffer.height = HEIGHT;
p->framebuffer.nr_cbufs = 1;
- p->framebuffer.cbufs[0] = p->screen->get_tex_surface(p->screen, p->target, 0, 0, 0, PIPE_BIND_RENDER_TARGET);
+ p->framebuffer.cbufs[0] = p->pipe->create_surface(p->pipe, p->target, &surf_tmpl);
/* viewport, depth isn't really needed */
{