summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a2xx
diff options
context:
space:
mode:
authorSerge Martin <[email protected]>2015-12-06 15:32:15 +0100
committerRob Clark <[email protected]>2015-12-09 17:30:58 -0500
commite63fec29a1bde71a707ee6ac89763896e33e3c0c (patch)
tree6ec2aff0b57ea7653ed83d9a720f7884a3754575 /src/gallium/drivers/freedreno/a2xx
parentf32f80e19d2f772b29ab3f3346ca524be356989e (diff)
freedreno: fix bind_sampler_states when hwcso is NULL
src/gallium/tests/trivial/compute.c expects samplers to be cleaned when the samplers list is NULL. Like in radeon, the function behave like when the number of samplers parameter is set to 0. [small s/hwsco/hwcso/ typo fix] Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_texture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c
index 90013e260ce..6e4b5a5e72c 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c
@@ -106,6 +106,9 @@ fd2_sampler_states_bind(struct pipe_context *pctx,
unsigned shader, unsigned start,
unsigned nr, void **hwcso)
{
+ if (!hwcso)
+ nr = 0;
+
if (shader == PIPE_SHADER_FRAGMENT) {
struct fd_context *ctx = fd_context(pctx);