case PIPE_TEX_WRAP_REPEAT:
return MALI_WRAP_REPEAT;
- /* TODO: lower GL_CLAMP? */
case PIPE_TEX_WRAP_CLAMP:
+ return MALI_WRAP_CLAMP;
+
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
return MALI_WRAP_CLAMP_TO_EDGE;
case PIPE_TEX_WRAP_MIRROR_REPEAT:
return MALI_WRAP_MIRRORED_REPEAT;
+ case PIPE_TEX_WRAP_MIRROR_CLAMP:
+ return MALI_WRAP_MIRRORED_CLAMP;
+
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
+ return MALI_WRAP_MIRRORED_CLAMP_TO_EDGE;
+
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
+ return MALI_WRAP_MIRRORED_CLAMP_TO_BORDER;
+
default:
unreachable("Invalid wrap");
}
case PIPE_CAP_TEXTURE_SWIZZLE:
return 1;
+ case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
+ case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE:
+ return 1;
+
case PIPE_CAP_TGSI_INSTANCEID:
case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return is_deqp ? 1 : 0;
#define MALI_POSITIVE(dim) (dim - 1)
-/* Used with wrapping. Incomplete (this is a 4-bit field...) */
+/* Used with wrapping. Unclear what top bit conveys */
enum mali_wrap_mode {
- MALI_WRAP_REPEAT = 0x8,
- MALI_WRAP_CLAMP_TO_EDGE = 0x9,
- MALI_WRAP_CLAMP_TO_BORDER = 0xB,
- MALI_WRAP_MIRRORED_REPEAT = 0xC
+ MALI_WRAP_REPEAT = 0x8 | 0x0,
+ MALI_WRAP_CLAMP_TO_EDGE = 0x8 | 0x1,
+ MALI_WRAP_CLAMP = 0x8 | 0x2,
+ MALI_WRAP_CLAMP_TO_BORDER = 0x8 | 0x3,
+ MALI_WRAP_MIRRORED_REPEAT = 0x8 | 0x4 | 0x0,
+ MALI_WRAP_MIRRORED_CLAMP_TO_EDGE = 0x8 | 0x4 | 0x1,
+ MALI_WRAP_MIRRORED_CLAMP = 0x8 | 0x4 | 0x2,
+ MALI_WRAP_MIRRORED_CLAMP_TO_BORDER = 0x8 | 0x4 | 0x3,
};
/* Shared across both command stream and Midgard, and even with Bifrost */