aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/gallium')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format.c2
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format.h7
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_rect.h6
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_tile.c2
4 files changed, 8 insertions, 9 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.c b/mesalib/src/gallium/auxiliary/util/u_format.c
index 08ef6ab3e..a8aa5719d 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format.c
@@ -34,9 +34,9 @@
#include "u_math.h"
#include "u_memory.h"
-#include "u_rect.h"
#include "u_format.h"
#include "u_format_s3tc.h"
+#include "u_surface.h"
#include "pipe/p_defines.h"
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.h b/mesalib/src/gallium/auxiliary/util/u_format.h
index 28527f532..84f16d503 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format.h
+++ b/mesalib/src/gallium/auxiliary/util/u_format.h
@@ -716,10 +716,15 @@ static INLINE uint
util_format_get_blocksize(enum pipe_format format)
{
uint bits = util_format_get_blocksizebits(format);
+ uint bytes = bits / 8;
assert(bits % 8 == 0);
+ assert(bytes > 0);
+ if (bytes == 0) {
+ bytes = 1;
+ }
- return bits / 8;
+ return bytes;
}
static INLINE uint
diff --git a/mesalib/src/gallium/auxiliary/util/u_rect.h b/mesalib/src/gallium/auxiliary/util/u_rect.h
index 10909b202..c141550be 100644
--- a/mesalib/src/gallium/auxiliary/util/u_rect.h
+++ b/mesalib/src/gallium/auxiliary/util/u_rect.h
@@ -83,10 +83,4 @@ u_rect_possible_intersection(const struct u_rect *a,
}
#endif
-
-/* Include pipe copy/fill rect helpers declarations for backwards compatibility
- */
-#include "util/u_surface.h"
-
-
#endif /* U_RECT_H */
diff --git a/mesalib/src/gallium/auxiliary/util/u_tile.c b/mesalib/src/gallium/auxiliary/util/u_tile.c
index 62298cdab..fb80aec42 100644
--- a/mesalib/src/gallium/auxiliary/util/u_tile.c
+++ b/mesalib/src/gallium/auxiliary/util/u_tile.c
@@ -37,7 +37,7 @@
#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
-#include "util/u_rect.h"
+#include "util/u_surface.h"
#include "util/u_tile.h"