uint32_t colormask;
if (pfb->cbufs[0] &&
- translate_rs_format_rb_swap(pfb->cbufs[0]->texture->format)) {
+ translate_rs_format_rb_swap(pfb->cbufs[0]->format)) {
colormask = rt0->colormask & (PIPE_MASK_A | PIPE_MASK_G);
if (rt0->colormask & PIPE_MASK_R)
colormask |= PIPE_MASK_B;
struct compiled_blend_color *cs = &ctx->blend_color;
if (pfb->cbufs[0] &&
- translate_rs_format_rb_swap(pfb->cbufs[0]->texture->format)) {
+ translate_rs_format_rb_swap(pfb->cbufs[0]->format)) {
cs->PE_ALPHA_BLEND_COLOR =
VIVS_PE_ALPHA_BLEND_COLOR_R(etna_cfloat_to_uint8(cs->color[2])) |
VIVS_PE_ALPHA_BLEND_COLOR_G(etna_cfloat_to_uint8(cs->color[1])) |
ctx->dirty |= ETNA_DIRTY_INDEX_BUFFER;
struct etna_shader_key key = {};
- struct etna_surface *cbuf = etna_surface(pfb->cbufs[0]);
-
- if (cbuf) {
- struct etna_resource *res = etna_resource(cbuf->base.texture);
-
- key.frag_rb_swap = !!translate_rs_format_rb_swap(res->base.format);
- }
+ if (pfb->cbufs[0])
+ key.frag_rb_swap = !!translate_rs_format_rb_swap(pfb->cbufs[0]->format);
if (!etna_get_vs(ctx, key) || !etna_get_fs(ctx, key)) {
BUG("compiled shaders are not okay");