summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-06-14 03:19:26 +0200
committerMarek Olšák <[email protected]>2014-06-19 00:17:36 +0200
commit1df7199fc933facf2e74304976c3798e474929a1 (patch)
tree207d31eb6a4406f0183c579f2dcf68baded74abb /src/gallium/drivers/softpipe
parent552c70a837b68124a8cd85873d45075fa17659f4 (diff)
gallium: implement ARB_texture_query_levels
The extension is always supported if GLSL 1.30 is supported. Softpipe and llvmpipe support is also added (trivial). Radeon and nouveau support is already done. Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 274e56b40c7..6d97664f97f 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -2911,6 +2911,9 @@ sp_get_dims(struct sp_sampler_view *sp_sview, int level,
if (level > view->u.tex.last_level)
return;
+ if (texture->target != PIPE_BUFFER)
+ dims[3] = view->u.tex.last_level - view->u.tex.first_level + 1;
+
dims[0] = u_minify(texture->width0, level);
switch(texture->target) {