nv30: fix some s3tc layout issues
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 31 Dec 2018 00:17:10 +0000 (19:17 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 31 Dec 2018 04:32:21 +0000 (23:32 -0500)
commit207fb558e458106241740fe77adba27af8300983
tree02eeee013f4330ebab90118fc2c75e1b76d67c36
parentad251330e858aeab0cee111488b203e993f76b89
nv30: fix some s3tc layout issues

s3tc layouts are a bit finicky - they're packed, but not swizzled.
Adjust logic to allow for that case:

  - Don't set a uniform pitch for POT-sized compressed textures
  - Adjust define_rect API to be less confused about block sizes
  - Only mark a texture as linear if it has a uniform pitch set

This has been tested to fix xonotic (as well as the s3tc-* piglits)
on nv3x and keeps it working on nv4x.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv30/nv30_miptree.c
src/gallium/drivers/nouveau/nv30/nv30_texture.c