diff options
author | Lucas Stach <[email protected]> | 2018-11-14 15:11:07 +0100 |
---|---|---|
committer | Lucas Stach <[email protected]> | 2018-12-18 19:07:10 +0100 |
commit | a3e592e839db7b484ee1e524d3ea5579f76c4b66 (patch) | |
tree | 796d6859efd5ced44d99c16360ddc1a7429be93a /src/gallium/drivers/etnaviv/etnaviv_context.c | |
parent | 7a90886921eb1d5d73b40aadd6fd3f340041bd26 (diff) |
etnaviv: use surface format directly
There is no need to do the detour over the resource behind the
surface to get the format. Use the surface format directly.
Signed-off-by: Lucas Stach <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_context.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_context.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c index 1c305d82a0f..aa742566289 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.c +++ b/src/gallium/drivers/etnaviv/etnaviv_context.c @@ -212,13 +212,8 @@ etna_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) 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"); |