diff options
author | Eric Anholt <[email protected]> | 2018-01-09 15:46:34 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-01-12 21:56:00 -0800 |
commit | 469bbd8387d11bbac2aae4c49765c748c2a9fd04 (patch) | |
tree | 4c35dd8b7fc068ce68d19fcea85346db825f4431 /src/gallium/drivers/vc5/vc5_state.c | |
parent | 34898c8c45a5cbb84a027d74854efb1486d65bc4 (diff) |
broadcom/vc5: Move the formats table to per-V3D-version compile.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_state.c')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_state.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c index 19e82c6c7d9..79795c765aa 100644 --- a/src/gallium/drivers/vc5/vc5_state.c +++ b/src/gallium/drivers/vc5/vc5_state.c @@ -557,6 +557,8 @@ static struct pipe_sampler_view * vc5_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, const struct pipe_sampler_view *cso) { + struct vc5_context *vc5 = vc5_context(pctx); + struct vc5_screen *screen = vc5->screen; struct vc5_sampler_view *so = CALLOC_STRUCT(vc5_sampler_view); struct vc5_resource *rsc = vc5_resource(prsc); @@ -577,7 +579,8 @@ vc5_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, cso->swizzle_b, cso->swizzle_a }; - const uint8_t *fmt_swizzle = vc5_get_format_swizzle(so->base.format); + const uint8_t *fmt_swizzle = + vc5_get_format_swizzle(&screen->devinfo, so->base.format); util_format_compose_swizzles(fmt_swizzle, view_swizzle, so->swizzle); so->base.texture = prsc; @@ -613,10 +616,11 @@ vc5_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, assert(util_format_linear(cso->format) == util_format_linear(prsc->format)); uint32_t output_image_format = - vc5_get_rt_format(cso->format); + vc5_get_rt_format(&screen->devinfo, cso->format); uint32_t internal_type; uint32_t internal_bpp; - vc5_get_internal_type_bpp_for_output_format(output_image_format, + vc5_get_internal_type_bpp_for_output_format(&screen->devinfo, + output_image_format, &internal_type, &internal_bpp); @@ -639,7 +643,8 @@ vc5_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, */ tex.srgb = false; } else { - tex.texture_type = vc5_get_tex_format(cso->format); + tex.texture_type = vc5_get_tex_format(&screen->devinfo, + cso->format); } tex.uif_xor_disable = (rsc->slices[0].tiling == |