for (i = 0; i < ARRAY_SIZE(blend->rb_mrt); i++) {
bool is_float = util_format_is_float(
pipe_surface_format(ctx->framebuffer.cbufs[i]));
+ bool is_int = util_format_is_pure_integer(
+ pipe_surface_format(ctx->framebuffer.cbufs[i]));
+ uint32_t control = blend->rb_mrt[i].control;
+
+ if (is_int) {
+ control &= (A3XX_RB_MRT_CONTROL_COMPONENT_ENABLE__MASK |
+ A3XX_RB_MRT_CONTROL_DITHER_MODE__MASK);
+ control |= A3XX_RB_MRT_CONTROL_ROP_CODE(ROP_COPY);
+ }
OUT_PKT0(ring, REG_A3XX_RB_MRT_CONTROL(i), 1);
- OUT_RING(ring, blend->rb_mrt[i].control);
+ OUT_RING(ring, control);
OUT_PKT0(ring, REG_A3XX_RB_MRT_BLEND_CONTROL(i), 1);
OUT_RING(ring, blend->rb_mrt[i].blend_control |
if ((usage & (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT |
- PIPE_BIND_SHARED)) &&
+ PIPE_BIND_SHARED |
+ PIPE_BIND_BLENDABLE)) &&
(fd3_pipe2color(format) != ~0) &&
(fd3_pipe2tex(format) != ~0)) {
retval |= usage & (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT |
PIPE_BIND_SHARED);
+ if (!util_format_is_pure_integer(format))
+ retval |= usage & PIPE_BIND_BLENDABLE;
}
if ((usage & PIPE_BIND_DEPTH_STENCIL) &&