From 1df7199fc933facf2e74304976c3798e474929a1 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 14 Jun 2014 03:19:26 +0200 Subject: 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 --- src/gallium/drivers/softpipe/sp_tex_sample.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/softpipe') 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) { -- cgit v1.2.3