summaryrefslogtreecommitdiff
path: root/src/gallium/tests/graw/fs-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/tests/graw/fs-test.c')
-rw-r--r--src/gallium/tests/graw/fs-test.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c
index 19af83fda8..37be2d0830 100644
--- a/src/gallium/tests/graw/fs-test.c
+++ b/src/gallium/tests/graw/fs-test.c
@@ -119,6 +119,7 @@ static void init_fs_constbuf( void )
templat.width0 = sizeof(constants1);
templat.height0 = 1;
templat.depth0 = 1;
+ templat.array_size = 1;
templat.last_level = 0;
templat.nr_samples = 1;
templat.bind = PIPE_BIND_CONSTANT_BUFFER;
@@ -139,7 +140,7 @@ static void init_fs_constbuf( void )
ctx->transfer_inline_write(ctx,
constbuf1,
- u_subresource(0,0),
+ 0,
PIPE_TRANSFER_WRITE,
&box,
constants1,
@@ -156,7 +157,7 @@ static void init_fs_constbuf( void )
ctx->transfer_inline_write(ctx,
constbuf2,
- u_subresource(0,0),
+ 0,
PIPE_TRANSFER_WRITE,
&box,
constants2,
@@ -280,7 +281,7 @@ static void draw( void )
graw_save_surface_to_file(ctx, surf, NULL);
- screen->flush_frontbuffer(screen, surf, window);
+ screen->flush_frontbuffer(screen, rttex, 0, 0, window);
}
#define SIZE 16
@@ -340,6 +341,7 @@ static void init_tex( void )
templat.width0 = SIZE;
templat.height0 = SIZE;
templat.depth0 = 1;
+ templat.array_size = 1;
templat.last_level = 0;
templat.nr_samples = 1;
templat.bind = PIPE_BIND_SAMPLER_VIEW;
@@ -354,7 +356,7 @@ static void init_tex( void )
ctx->transfer_inline_write(ctx,
samptex,
- u_subresource(0,0),
+ 0,
PIPE_TRANSFER_WRITE,
&box,
tex2d,
@@ -368,7 +370,7 @@ static void init_tex( void )
struct pipe_transfer *t;
uint32_t *ptr;
t = pipe_get_transfer(ctx, samptex,
- 0, 0, 0, /* face, level, zslice */
+ 0, 0, /* level, layer */
PIPE_TRANSFER_READ,
0, 0, SIZE, SIZE); /* x, y, width, height */
@@ -387,8 +389,6 @@ static void init_tex( void )
memset(&sv_template, 0, sizeof sv_template);
sv_template.format = samptex->format;
sv_template.texture = samptex;
- sv_template.first_level = 0;
- sv_template.last_level = 0;
sv_template.swizzle_r = 0;
sv_template.swizzle_g = 1;
sv_template.swizzle_b = 2;
@@ -424,6 +424,7 @@ static void init( void )
{
struct pipe_framebuffer_state fb;
struct pipe_resource templat;
+ struct pipe_surface surf_tmpl;
int i;
/* It's hard to say whether window or screen should be created
@@ -450,6 +451,7 @@ static void init( void )
templat.width0 = WIDTH;
templat.height0 = HEIGHT;
templat.depth0 = 1;
+ templat.array_size = 1;
templat.last_level = 0;
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
@@ -460,9 +462,12 @@ static void init( void )
if (rttex == NULL)
exit(4);
- surf = screen->get_tex_surface(screen, rttex, 0, 0, 0,
- PIPE_BIND_RENDER_TARGET |
- PIPE_BIND_DISPLAY_TARGET);
+ 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;
+ surf = ctx->create_surface(ctx, rttex, &surf_tmpl);
if (surf == NULL)
exit(5);