On Tue, May 31, 2016 at 5:06 PM, Brian Paul <bri...@vmware.com> wrote: > On 05/31/2016 08:39 AM, Marek Olšák wrote: >> >> Ping >> >> On Thu, May 19, 2016 at 12:59 PM, Marek Olšák <mar...@gmail.com> wrote: >>> >>> From: Marek Olšák <marek.ol...@amd.com> >>> >>> --- >>> src/gallium/auxiliary/util/u_inlines.h | 12 ++++++++++++ >>> src/gallium/drivers/radeon/r600_texture.c | 23 ++++++----------------- >>> 2 files changed, 18 insertions(+), 17 deletions(-) >>> >>> diff --git a/src/gallium/auxiliary/util/u_inlines.h >>> b/src/gallium/auxiliary/util/u_inlines.h >>> index 07c058a..b733c9f 100644 >>> --- a/src/gallium/auxiliary/util/u_inlines.h >>> +++ b/src/gallium/auxiliary/util/u_inlines.h >>> @@ -650,6 +650,18 @@ util_max_layer(const struct pipe_resource *r, >>> unsigned level) >>> } >>> } >>> >>> +static inline bool >>> +util_texrange_covers_whole_level(const struct pipe_resource *tex, >>> + unsigned level, unsigned x, unsigned y, >>> + unsigned z, unsigned width, >>> + unsigned height, unsigned depth) >>> +{ >>> + return x == 0 && y == 0 && z == 0 && >>> + width == u_minify(tex->width0, level) && >>> + height == u_minify(tex->height0, level) && >>> + depth == util_max_layer(tex, level) + 1; >>> +} > > > Is the function only meant to handle 1/2D mipmapped textures? What about > cube, 3d, array, etc? Can we assert on tex->target for the expected types?
No, all texture targets are supported. util_max_layer takes care of that. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev