summaryrefslogtreecommitdiffstats
path: root/src/gallium/tests
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-10-07 18:16:22 -0600
committerBrian Paul <brianp@vmware.com>2013-10-23 10:15:38 -0600
commita3ed98f7aa85636579a5696bf036ec13e5c9104a (patch)
tree104078a2a8b875e5ec7c5524e7797d46d109d7e0 /src/gallium/tests
parentb11fc226e6b106de8eb777a8e62c4f7303c66fbc (diff)
downloadexternal_mesa3d-a3ed98f7aa85636579a5696bf036ec13e5c9104a.zip
external_mesa3d-a3ed98f7aa85636579a5696bf036ec13e5c9104a.tar.gz
external_mesa3d-a3ed98f7aa85636579a5696bf036ec13e5c9104a.tar.bz2
gallium: new, unified pipe_context::set_sampler_views() function
The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/gallium/tests')
-rw-r--r--src/gallium/tests/graw/fs-test.c2
-rw-r--r--src/gallium/tests/graw/gs-test.c2
-rw-r--r--src/gallium/tests/graw/quad-sample.c2
-rw-r--r--src/gallium/tests/graw/quad-tex.c2
-rw-r--r--src/gallium/tests/graw/tex-srgb.c4
-rw-r--r--src/gallium/tests/graw/tex-swizzle.c2
-rw-r--r--src/gallium/tests/graw/vs-test.c2
-rw-r--r--src/gallium/tests/trivial/compute.c4
8 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c
index d962791..4d38e08 100644
--- a/src/gallium/tests/graw/fs-test.c
+++ b/src/gallium/tests/graw/fs-test.c
@@ -352,7 +352,7 @@ static void init_tex( void )
if (sv == NULL)
exit(5);
- ctx->set_fragment_sampler_views(ctx, 1, &sv);
+ ctx->set_sampler_views(ctx, PIPE_SHADER_FRAGMENT, 0, 1, &sv);
memset(&sampler_desc, 0, sizeof sampler_desc);
diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c
index 2a8f26e..3ada18a 100644
--- a/src/gallium/tests/graw/gs-test.c
+++ b/src/gallium/tests/graw/gs-test.c
@@ -459,7 +459,7 @@ static void init_tex( void )
if (sv == NULL)
exit(5);
- ctx->set_fragment_sampler_views(ctx, 1, &sv);
+ ctx->set_sampler_views(ctx, PIPE_SHADER_FRAGMENT, 0, 1, &sv);
memset(&sampler_desc, 0, sizeof sampler_desc);
diff --git a/src/gallium/tests/graw/quad-sample.c b/src/gallium/tests/graw/quad-sample.c
index bfae2e0..b4a29e1 100644
--- a/src/gallium/tests/graw/quad-sample.c
+++ b/src/gallium/tests/graw/quad-sample.c
@@ -267,7 +267,7 @@ static void init_tex( void )
if (sv == NULL)
exit(5);
- ctx->set_fragment_sampler_views(ctx, 1, &sv);
+ ctx->set_sampler_views(ctx, PIPE_SHADER_FRAGMENT, 0, 1, &sv);
memset(&sampler_desc, 0, sizeof sampler_desc);
diff --git a/src/gallium/tests/graw/quad-tex.c b/src/gallium/tests/graw/quad-tex.c
index 7802d8e..9e4407e 100644
--- a/src/gallium/tests/graw/quad-tex.c
+++ b/src/gallium/tests/graw/quad-tex.c
@@ -167,7 +167,7 @@ static void init_tex( void )
PIPE_FORMAT_B8G8R8A8_UNORM, tex2d);
sv = graw_util_create_simple_sampler_view(&info, texture);
- info.ctx->set_fragment_sampler_views(info.ctx, 1, &sv);
+ info.ctx->set_sampler_views(info.ctx, PIPE_SHADER_FRAGMENT, 0, 1, &sv);
sampler = graw_util_create_simple_sampler(&info,
PIPE_TEX_WRAP_REPEAT,
diff --git a/src/gallium/tests/graw/tex-srgb.c b/src/gallium/tests/graw/tex-srgb.c
index 5035fa7..dce9118 100644
--- a/src/gallium/tests/graw/tex-srgb.c
+++ b/src/gallium/tests/graw/tex-srgb.c
@@ -128,11 +128,11 @@ static void draw( void )
info.ctx->clear(info.ctx, PIPE_CLEAR_COLOR, &clear_color, 0, 0);
- info.ctx->set_fragment_sampler_views(info.ctx, 1, &linear_sv);
+ info.ctx->set_sampler_views(info.ctx, PIPE_SHADER_FRAGMENT, 0, 1, &linear_sv);
set_vertices(vertices1, 4);
util_draw_arrays(info.ctx, PIPE_PRIM_QUADS, 0, 4);
- info.ctx->set_fragment_sampler_views(info.ctx, 1, &srgb_sv);
+ info.ctx->set_sampler_views(info.ctx, PIPE_SHADER_FRAGMENT, 0, 1, &srgb_sv);
set_vertices(vertices2, 4);
util_draw_arrays(info.ctx, PIPE_PRIM_QUADS, 0, 4);
diff --git a/src/gallium/tests/graw/tex-swizzle.c b/src/gallium/tests/graw/tex-swizzle.c
index 65c1d4d..910a8ca 100644
--- a/src/gallium/tests/graw/tex-swizzle.c
+++ b/src/gallium/tests/graw/tex-swizzle.c
@@ -146,7 +146,7 @@ init_tex(const unsigned swizzle[4])
if (sv == NULL)
exit(5);
- info.ctx->set_fragment_sampler_views(info.ctx, 1, &sv);
+ info.ctx->set_sampler_views(info.ctx, PIPE_SHADER_FRAGMENT, 0, 1, &sv);
sampler = graw_util_create_simple_sampler(&info,
PIPE_TEX_WRAP_REPEAT,
diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c
index f351928..f7d4d73 100644
--- a/src/gallium/tests/graw/vs-test.c
+++ b/src/gallium/tests/graw/vs-test.c
@@ -346,7 +346,7 @@ static void init_tex( void )
if (sv == NULL)
exit(5);
- ctx->set_fragment_sampler_views(ctx, 1, &sv);
+ ctx->set_sampler_views(ctx, PIPE_SHADER_FRAGMENT, 0, 1, &sv);
memset(&sampler_desc, 0, sizeof sampler_desc);
diff --git a/src/gallium/tests/trivial/compute.c b/src/gallium/tests/trivial/compute.c
index 339c264..4edb857 100644
--- a/src/gallium/tests/trivial/compute.c
+++ b/src/gallium/tests/trivial/compute.c
@@ -312,7 +312,7 @@ static void init_sampler_views(struct context *ctx, const int *slots)
assert(ctx->view[i]);
}
- pipe->set_compute_sampler_views(pipe, 0, i, ctx->view);
+ pipe->set_sampler_views(pipe, PIPE_SHADER_COMPUTE, 0, i, ctx->view);
}
static void destroy_sampler_views(struct context *ctx)
@@ -320,7 +320,7 @@ static void destroy_sampler_views(struct context *ctx)
struct pipe_context *pipe = ctx->pipe;
int i;
- pipe->set_compute_sampler_views(pipe, 0, MAX_RESOURCES, NULL);
+ pipe->set_sampler_views(pipe, PIPE_SHADER_COMPUTE, 0, MAX_RESOURCES, NULL);
for (i = 0; i < MAX_RESOURCES; ++i) {
if (ctx->view[i]) {