diff options
Diffstat (limited to 'src/gallium/tests/trivial/quad-tex.c')
-rw-r--r-- | src/gallium/tests/trivial/quad-tex.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/gallium/tests/trivial/quad-tex.c b/src/gallium/tests/trivial/quad-tex.c index cc19e8d5eec..7caac29299f 100644 --- a/src/gallium/tests/trivial/quad-tex.c +++ b/src/gallium/tests/trivial/quad-tex.c @@ -57,16 +57,12 @@ #include "util/u_memory.h" /* util_make_[fragment|vertex]_passthrough_shader */ #include "util/u_simple_shaders.h" - -/* sw_screen_create: to get a software pipe driver */ -#include "target-helpers/inline_sw_helper.h" -/* debug_screen_wrap: to wrap with debug pipe drivers */ -#include "target-helpers/inline_debug_helper.h" -/* null software winsys */ -#include "sw/null/null_sw_winsys.h" +/* to get a hardware pipe driver */ +#include "pipe-loader/pipe_loader.h" struct program { + struct pipe_loader_device *dev; struct pipe_screen *screen; struct pipe_context *pipe; struct cso_context *cso; @@ -93,10 +89,15 @@ 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 */ - p->screen = debug_screen_wrap(p->screen); + int ret; + + /* find a hardware device */ + ret = pipe_loader_probe(&p->dev, 1); + assert(ret); + + /* init a pipe screen */ + p->screen = pipe_loader_create_screen(p->dev, PIPE_SEARCH_DIR); + assert(p->screen); /* create the pipe driver context and cso context */ p->pipe = p->screen->context_create(p->screen, NULL); @@ -298,6 +299,7 @@ static void close_prog(struct program *p) cso_destroy_context(p->cso); p->pipe->destroy(p->pipe); p->screen->destroy(p->screen); + pipe_loader_release(&p->dev, 1); FREE(p); } |