freedreno/a6xx: Remove fd6_format.[ch]

Just use the fdl6 version of the one remaining helper.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17817>
This commit is contained in:
Rob Clark 2022-07-16 11:08:52 -07:00 committed by Marge Bot
parent 07e9543270
commit 57c03bdf14
20 changed files with 19 additions and 125 deletions

View file

@ -35,6 +35,18 @@
#include "adreno_common.xml.h"
#include "a6xx.xml.h"
static inline enum a6xx_tex_swiz
fdl6_swiz(unsigned char swiz)
{
STATIC_ASSERT((unsigned) A6XX_TEX_X == (unsigned) PIPE_SWIZZLE_X);
STATIC_ASSERT((unsigned) A6XX_TEX_Y == (unsigned) PIPE_SWIZZLE_Y);
STATIC_ASSERT((unsigned) A6XX_TEX_Z == (unsigned) PIPE_SWIZZLE_Z);
STATIC_ASSERT((unsigned) A6XX_TEX_W == (unsigned) PIPE_SWIZZLE_W);
STATIC_ASSERT((unsigned) A6XX_TEX_ZERO == (unsigned) PIPE_SWIZZLE_0);
STATIC_ASSERT((unsigned) A6XX_TEX_ONE == (unsigned) PIPE_SWIZZLE_1);
return (enum a6xx_tex_swiz) swiz;
}
enum a6xx_depth_format fd6_pipe2depth(enum pipe_format format);
enum a6xx_format fd6_vertex_format(enum pipe_format format) ATTRIBUTE_CONST;

View file

@ -29,18 +29,6 @@
#include "freedreno_layout.h"
#include "fd6_format_table.h"
static enum a6xx_tex_swiz
fdl6_swiz(unsigned char swiz)
{
STATIC_ASSERT((unsigned) A6XX_TEX_X == (unsigned) PIPE_SWIZZLE_X);
STATIC_ASSERT((unsigned) A6XX_TEX_Y == (unsigned) PIPE_SWIZZLE_Y);
STATIC_ASSERT((unsigned) A6XX_TEX_Z == (unsigned) PIPE_SWIZZLE_Z);
STATIC_ASSERT((unsigned) A6XX_TEX_W == (unsigned) PIPE_SWIZZLE_W);
STATIC_ASSERT((unsigned) A6XX_TEX_ZERO == (unsigned) PIPE_SWIZZLE_0);
STATIC_ASSERT((unsigned) A6XX_TEX_ONE == (unsigned) PIPE_SWIZZLE_1);
return (enum a6xx_tex_swiz) swiz;
}
static enum a6xx_tex_type
fdl6_tex_type(enum fdl_view_type type, bool storage)
{

View file

@ -33,7 +33,6 @@
#include "fd6_blend.h"
#include "fd6_context.h"
#include "fd6_format.h"
#include "fd6_pack.h"
// XXX move somewhere common.. same across a3xx/a4xx/a5xx..

View file

@ -37,7 +37,6 @@
#include "fd6_blitter.h"
#include "fd6_emit.h"
#include "fd6_format.h"
#include "fd6_resource.h"
static inline enum a6xx_2d_ifmt

View file

@ -36,7 +36,6 @@
#include "fd6_context.h"
#include "fd6_draw.h"
#include "fd6_emit.h"
#include "fd6_format.h"
#include "fd6_program.h"
#include "fd6_vsc.h"
#include "fd6_zsa.h"

View file

@ -42,7 +42,6 @@
#include "fd6_const.h"
#include "fd6_context.h"
#include "fd6_emit.h"
#include "fd6_format.h"
#include "fd6_image.h"
#include "fd6_pack.h"
#include "fd6_program.h"

View file

@ -31,8 +31,8 @@
#include "pipe/p_context.h"
#include "fd6_context.h"
#include "fd6_format.h"
#include "fd6_program.h"
#include "fdl/fd6_format_table.h"
#include "freedreno_context.h"
#include "ir3_gallium.h"

View file

@ -1,53 +0,0 @@
/*
* Copyright (C) 2016 Rob Clark <robclark@freedesktop.org>
* Copyright © 2018 Google, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Authors:
* Rob Clark <robclark@freedesktop.org>
*/
#include "pipe/p_defines.h"
#include "util/format/u_format.h"
#include "fd6_format.h"
#include "freedreno_resource.h"
enum a6xx_tex_swiz
fd6_pipe2swiz(unsigned swiz)
{
switch (swiz) {
default:
case PIPE_SWIZZLE_X:
return A6XX_TEX_X;
case PIPE_SWIZZLE_Y:
return A6XX_TEX_Y;
case PIPE_SWIZZLE_Z:
return A6XX_TEX_Z;
case PIPE_SWIZZLE_W:
return A6XX_TEX_W;
case PIPE_SWIZZLE_0:
return A6XX_TEX_ZERO;
case PIPE_SWIZZLE_1:
return A6XX_TEX_ONE;
}
}

View file

@ -1,39 +0,0 @@
/*
* Copyright (C) 2016 Rob Clark <robclark@freedesktop.org>
* Copyright © 2018 Google, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Authors:
* Rob Clark <robclark@freedesktop.org>
*/
#ifndef FD6_UTIL_H_
#define FD6_UTIL_H_
#include "fdl/fd6_format_table.h"
#include "freedreno_resource.h"
#include "freedreno_util.h"
#include "a6xx.xml.h"
enum a6xx_tex_swiz fd6_pipe2swiz(unsigned swiz);
#endif /* FD6_UTIL_H_ */

View file

@ -42,7 +42,6 @@
#include "fd6_context.h"
#include "fd6_draw.h"
#include "fd6_emit.h"
#include "fd6_format.h"
#include "fd6_gmem.h"
#include "fd6_pack.h"
#include "fd6_program.h"
@ -278,10 +277,10 @@ patch_fb_read_gmem(struct fd_batch *batch)
A6XX_TEX_CONST_0_SWAP(WZYX) |
A6XX_TEX_CONST_0_TILE_MODE(TILE6_2) |
COND(util_format_is_srgb(format), A6XX_TEX_CONST_0_SRGB) |
A6XX_TEX_CONST_0_SWIZ_X(fd6_pipe2swiz(swiz[0])) |
A6XX_TEX_CONST_0_SWIZ_Y(fd6_pipe2swiz(swiz[1])) |
A6XX_TEX_CONST_0_SWIZ_Z(fd6_pipe2swiz(swiz[2])) |
A6XX_TEX_CONST_0_SWIZ_W(fd6_pipe2swiz(swiz[3]));
A6XX_TEX_CONST_0_SWIZ_X(fdl6_swiz(swiz[0])) |
A6XX_TEX_CONST_0_SWIZ_Y(fdl6_swiz(swiz[1])) |
A6XX_TEX_CONST_0_SWIZ_Z(fdl6_swiz(swiz[2])) |
A6XX_TEX_CONST_0_SWIZ_W(fdl6_swiz(swiz[3]));
for (unsigned i = 0; i < num_patches; i++) {
struct fd_cs_patch *patch = fd_patch_element(&batch->fb_read_patches, i);

View file

@ -30,7 +30,6 @@
#include "freedreno_resource.h"
#include "freedreno_state.h"
#include "fd6_format.h"
#include "fd6_image.h"
#include "fd6_resource.h"
#include "fd6_texture.h"

View file

@ -36,7 +36,6 @@
#include "fd6_const.h"
#include "fd6_emit.h"
#include "fd6_format.h"
#include "fd6_pack.h"
#include "fd6_program.h"
#include "fd6_texture.h"

View file

@ -32,7 +32,6 @@
#include "fd6_context.h"
#include "fd6_emit.h"
#include "fd6_format.h"
#include "fd6_query.h"
struct PACKED fd6_query_sample {

View file

@ -30,7 +30,6 @@
#include "util/u_string.h"
#include "fd6_context.h"
#include "fd6_format.h"
#include "fd6_pack.h"
#include "fd6_rasterizer.h"

View file

@ -27,8 +27,8 @@
#include "drm-uapi/drm_fourcc.h"
#include "fd6_format.h"
#include "fd6_resource.h"
#include "fdl/fd6_format_table.h"
#include "a6xx.xml.h"

View file

@ -32,7 +32,6 @@
#include "fd6_blitter.h"
#include "fd6_context.h"
#include "fd6_emit.h"
#include "fd6_format.h"
#include "fd6_resource.h"
#include "fd6_screen.h"

View file

@ -34,7 +34,6 @@
#include "freedreno_dev_info.h"
#include "fd6_emit.h"
#include "fd6_format.h"
#include "fd6_resource.h"
#include "fd6_texture.h"

View file

@ -34,7 +34,7 @@
#include "freedreno_texture.h"
#include "fd6_context.h"
#include "fd6_format.h"
#include "fdl/fd6_format_table.h"
struct fd6_sampler_stateobj {
struct pipe_sampler_state base;

View file

@ -30,7 +30,6 @@
#include "util/u_string.h"
#include "fd6_context.h"
#include "fd6_format.h"
#include "fd6_zsa.h"
/* update lza state based on stencil-test func:

View file

@ -192,8 +192,6 @@ files_libfreedreno = files(
'a6xx/fd6_draw.h',
'a6xx/fd6_emit.c',
'a6xx/fd6_emit.h',
'a6xx/fd6_format.c',
'a6xx/fd6_format.h',
'a6xx/fd6_gmem.c',
'a6xx/fd6_gmem.h',
'a6xx/fd6_image.c',