We are going to need these very soon to emit correct reads from the tlb
to implement logic operations.
Reviewed-by: Eric Anholt <eric@anholt.net>
*/
uint8_t int_color_rb;
uint8_t uint_color_rb;
*/
uint8_t int_color_rb;
uint8_t uint_color_rb;
+
+ /* Color format information per render target. Only set when logic
+ * operations are enabled.
+ */
+ struct {
+ enum pipe_format format;
+ const uint8_t *swizzle;
+ } color_fmt[V3D_MAX_DRAW_BUFFERS];
+
uint8_t alpha_test_func;
uint8_t logicop_func;
uint32_t point_sprite_mask;
uint8_t alpha_test_func;
uint8_t logicop_func;
uint32_t point_sprite_mask;
+ /* If logic operations are enabled then we might emit color
+ * reads and we need to know the color buffer format and
+ * swizzle for that.
+ */
+ if (key->logicop_func != PIPE_LOGICOP_COPY) {
+ key->color_fmt[i].format = cbuf->format;
+ key->color_fmt[i].swizzle =
+ v3d_get_format_swizzle(&v3d->screen->devinfo,
+ cbuf->format);
+ }
+
const struct util_format_description *desc =
util_format_description(cbuf->format);
const struct util_format_description *desc =
util_format_description(cbuf->format);