a5xx: remove no-longer-accurate border color layout comment
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 8 Jul 2017 15:13:35 +0000 (11:13 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 9 Jul 2017 01:14:58 +0000 (21:14 -0400)
Better to just point at the bcolor_entry struct which has our current
understanding encoded into it. Also add an assert to ensure that the
struct remains the expected size.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/a5xx/fd5_emit.c

index 8465389763c76a33621b858819ffb6f4630636dc..378ee2443b66d09c307064482dcdc31fc0a7c878 100644 (file)
@@ -127,38 +127,6 @@ fd5_emit_const_bo(struct fd_ringbuffer *ring, enum shader_t type, boolean write,
  * the same as a6xx then move this somewhere common ;-)
  *
  * Entry layout looks like (total size, 0x60 bytes):
- *
- *   offset | description
- *   -------+-------------
- *     0x00 | fp32[0]
- *          | fp32[1]
- *          | fp32[2]
- *          | fp32[3]
- *     0x10 | uint16[0]
- *          | uint16[1]
- *          | uint16[2]
- *          | uint16[3]
- *     0x18 | int16[0]
- *          | int16[1]
- *          | int16[2]
- *          | int16[3]
- *     0x20 | fp16[0]
- *          | fp16[1]
- *          | fp16[2]
- *          | fp16[3]
- *     0x28 | ?? maybe padding ??
- *     0x30 | uint8[0]
- *          | uint8[1]
- *          | uint8[2]
- *          | uint8[3]
- *     0x34 | int8[0]
- *          | int8[1]
- *          | int8[2]
- *          | int8[3]
- *     0x38 | ?? maybe padding ??
- *
- * Some uncertainty, because not clear that this actually works properly
- * with blob, so who knows..
  */
 
 struct PACKED bcolor_entry {
@@ -184,6 +152,7 @@ static void
 setup_border_colors(struct fd_texture_stateobj *tex, struct bcolor_entry *entries)
 {
        unsigned i, j;
+       STATIC_ASSERT(sizeof(struct bcolor_entry) == FD5_BORDER_COLOR_SIZE);
 
        for (i = 0; i < tex->num_samplers; i++) {
                struct bcolor_entry *e = &entries[i];