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_resource.c | |
parent | 34898c8c45a5cbb84a027d74854efb1486d65bc4 (diff) |
broadcom/vc5: Move the formats table to per-V3D-version compile.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_resource.c')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_resource.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gallium/drivers/vc5/vc5_resource.c b/src/gallium/drivers/vc5/vc5_resource.c index 3b1a56e4726..a9cc27127f0 100644 --- a/src/gallium/drivers/vc5/vc5_resource.c +++ b/src/gallium/drivers/vc5/vc5_resource.c @@ -436,6 +436,7 @@ static struct vc5_resource * vc5_resource_setup(struct pipe_screen *pscreen, const struct pipe_resource *tmpl) { + struct vc5_screen *screen = vc5_screen(pscreen); struct vc5_resource *rsc = CALLOC_STRUCT(vc5_resource); if (!rsc) return NULL; @@ -449,11 +450,13 @@ vc5_resource_setup(struct pipe_screen *pscreen, if (prsc->nr_samples <= 1) { rsc->cpp = util_format_get_blocksize(prsc->format); } else { - assert(vc5_rt_format_supported(prsc->format)); - uint32_t output_image_format = vc5_get_rt_format(prsc->format); + assert(vc5_rt_format_supported(&screen->devinfo, prsc->format)); + uint32_t output_image_format = + vc5_get_rt_format(&screen->devinfo, prsc->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); switch (internal_bpp) { @@ -637,6 +640,8 @@ vc5_create_surface(struct pipe_context *pctx, struct pipe_resource *ptex, const struct pipe_surface *surf_tmpl) { + struct vc5_context *vc5 = vc5_context(pctx); + struct vc5_screen *screen = vc5->screen; struct vc5_surface *surface = CALLOC_STRUCT(vc5_surface); struct vc5_resource *rsc = vc5_resource(ptex); @@ -676,7 +681,7 @@ vc5_create_surface(struct pipe_context *pctx, separate_stencil_slice->tiling; } - surface->format = vc5_get_rt_format(psurf->format); + surface->format = vc5_get_rt_format(&screen->devinfo, psurf->format); if (util_format_is_depth_or_stencil(psurf->format)) { switch (psurf->format) { @@ -692,7 +697,8 @@ vc5_create_surface(struct pipe_context *pctx, } } else { uint32_t bpp, type; - vc5_get_internal_type_bpp_for_output_format(surface->format, + vc5_get_internal_type_bpp_for_output_format(&screen->devinfo, + surface->format, &type, &bpp); surface->internal_type = type; surface->internal_bpp = bpp; |