Re: [Mesa-dev] [PATCH 2/6] gallium: Add support for 5551 with the 1-bit field in the low bit.
Reviewed-by: Marek OlšákMarek On Thu, Aug 17, 2017 at 6:10 PM, Eric Anholt wrote: > This is how VC4 stores 5551 textures, which we need to support for > GL_OES_required_internalformat. > > v2: Extend commit message, fix svga driver build, add BE ordering from > Roland. > --- > src/gallium/auxiliary/util/u_format.csv | 2 ++ > src/gallium/drivers/svga/svga_format.c | 2 ++ > src/gallium/include/pipe/p_format.h | 3 +++ > src/mesa/state_tracker/st_format.c | 16 +--- > 4 files changed, 20 insertions(+), 3 deletions(-) > > diff --git a/src/gallium/auxiliary/util/u_format.csv > b/src/gallium/auxiliary/util/u_format.csv > index cef530aae7c3..966b34bd722e 100644 > --- a/src/gallium/auxiliary/util/u_format.csv > +++ b/src/gallium/auxiliary/util/u_format.csv > @@ -74,6 +74,8 @@ PIPE_FORMAT_X8B8G8R8_UNORM, plain, 1, 1, x8 , un8 > , un8 , un8 , wzy1, r > PIPE_FORMAT_R8G8B8X8_UNORM, plain, 1, 1, un8 , un8 , un8 , x8 , > xyz1, rgb > PIPE_FORMAT_B5G5R5X1_UNORM, plain, 1, 1, un5 , un5 , un5 , x1 , > zyx1, rgb, x1 , un5 , un5 , un5 , yzw1 > PIPE_FORMAT_B5G5R5A1_UNORM, plain, 1, 1, un5 , un5 , un5 , un1 , > zyxw, rgb, un1 , un5 , un5 , un5 , yzwx > +PIPE_FORMAT_X1B5G5R5_UNORM, plain, 1, 1, x1 , un5 , un5 , un5 , > wzy1, rgb, un5 , un5 , un5 , x1 , xyz1 > +PIPE_FORMAT_A1B5G5R5_UNORM, plain, 1, 1, un1 , un5 , un5 , un5 , > wzyx, rgb, un5 , un5 , un5 , un1 , xyzw > PIPE_FORMAT_B4G4R4A4_UNORM, plain, 1, 1, un4 , un4 , un4 , un4 , > zyxw, rgb, un4 , un4 , un4 , un4 , yzwx > PIPE_FORMAT_B4G4R4X4_UNORM, plain, 1, 1, un4 , un4 , un4 , x4 , > zyx1, rgb, x4 , un4 , un4 , un4 , yzw1 > PIPE_FORMAT_B5G6R5_UNORM , plain, 1, 1, un5 , un6 , un5 , , > zyx1, rgb, un5 , un6 , un5 , , xyz1 > diff --git a/src/gallium/drivers/svga/svga_format.c > b/src/gallium/drivers/svga/svga_format.c > index 95dd04d8abd8..5b844b570e24 100644 > --- a/src/gallium/drivers/svga/svga_format.c > +++ b/src/gallium/drivers/svga/svga_format.c > @@ -58,6 +58,7 @@ static const struct vgpu10_format_entry > format_conversion_table[] = > { PIPE_FORMAT_A8R8G8B8_UNORM,SVGA3D_FORMAT_INVALID, > SVGA3D_FORMAT_INVALID, 0 }, > { PIPE_FORMAT_X8R8G8B8_UNORM,SVGA3D_FORMAT_INVALID, > SVGA3D_FORMAT_INVALID, 0 }, > { PIPE_FORMAT_B5G5R5A1_UNORM,SVGA3D_FORMAT_INVALID, > SVGA3D_B5G5R5A1_UNORM, TF_GEN_MIPS }, > + { PIPE_FORMAT_A1B5G5R5_UNORM,SVGA3D_FORMAT_INVALID, > SVGA3D_FORMAT_INVALID, 0 }, > { PIPE_FORMAT_B4G4R4A4_UNORM,SVGA3D_FORMAT_INVALID, > SVGA3D_FORMAT_INVALID, 0 }, > { PIPE_FORMAT_B5G6R5_UNORM, SVGA3D_FORMAT_INVALID, > SVGA3D_B5G6R5_UNORM, TF_GEN_MIPS }, > { PIPE_FORMAT_R10G10B10A2_UNORM, SVGA3D_R10G10B10A2_UNORM, > SVGA3D_R10G10B10A2_UNORM,TF_GEN_MIPS }, > @@ -175,6 +176,7 @@ static const struct vgpu10_format_entry > format_conversion_table[] = > { PIPE_FORMAT_R5SG5SB6U_NORM,SVGA3D_FORMAT_INVALID, > SVGA3D_FORMAT_INVALID, 0 }, > { PIPE_FORMAT_A8B8G8R8_UNORM,SVGA3D_FORMAT_INVALID, > SVGA3D_FORMAT_INVALID, 0 }, > { PIPE_FORMAT_B5G5R5X1_UNORM,SVGA3D_FORMAT_INVALID, > SVGA3D_FORMAT_INVALID, 0 }, > + { PIPE_FORMAT_X1B5G5R5_UNORM,SVGA3D_FORMAT_INVALID, > SVGA3D_FORMAT_INVALID, 0 }, > { PIPE_FORMAT_R10G10B10A2_USCALED, SVGA3D_R10G10B10A2_UNORM, > SVGA3D_FORMAT_INVALID, VF_PUINT_TO_USCALED }, > { PIPE_FORMAT_R11G11B10_FLOAT, SVGA3D_FORMAT_INVALID, > SVGA3D_R11G11B10_FLOAT, TF_GEN_MIPS }, > { PIPE_FORMAT_R9G9B9E5_FLOAT,SVGA3D_FORMAT_INVALID, > SVGA3D_R9G9B9E5_SHAREDEXP, 0 }, > diff --git a/src/gallium/include/pipe/p_format.h > b/src/gallium/include/pipe/p_format.h > index e4e09d8b4353..515ce62e2973 100644 > --- a/src/gallium/include/pipe/p_format.h > +++ b/src/gallium/include/pipe/p_format.h > @@ -391,6 +391,9 @@ enum pipe_format { > > PIPE_FORMAT_P016= 307, > > + PIPE_FORMAT_A1B5G5R5_UNORM = 308, > + PIPE_FORMAT_X1B5G5R5_UNORM = 309, > + > PIPE_FORMAT_COUNT > }; > > diff --git a/src/mesa/state_tracker/st_format.c > b/src/mesa/state_tracker/st_format.c > index 348853affd82..0ce785575ba8 100644 > --- a/src/mesa/state_tracker/st_format.c > +++ b/src/mesa/state_tracker/st_format.c > @@ -79,6 +79,8 @@ st_mesa_format_to_pipe_format(const struct st_context *st, > mesa_format mesaForma >return PIPE_FORMAT_XRGB_UNORM; > case MESA_FORMAT_B5G5R5A1_UNORM: >return PIPE_FORMAT_B5G5R5A1_UNORM; > + case MESA_FORMAT_A1B5G5R5_UNORM: > + return PIPE_FORMAT_A1B5G5R5_UNORM; > case MESA_FORMAT_B4G4R4A4_UNORM: >return PIPE_FORMAT_B4G4R4A4_UNORM; > case MESA_FORMAT_B5G6R5_UNORM: > @@ -407,6 +409,8 @@
Re: [Mesa-dev] [PATCH 2/6] gallium: Add support for 5551 with the 1-bit field in the low bit.
On 21 August 2017 at 19:12, Eric Anholtwrote: > Emil Velikov writes: > >> On 17 August 2017 at 17:10, Eric Anholt wrote: >>> This is how VC4 stores 5551 textures, which we need to support for >>> GL_OES_required_internalformat. >>> >>> v2: Extend commit message, fix svga driver build, add BE ordering from >>> Roland. >>> --- >>> src/gallium/auxiliary/util/u_format.csv | 2 ++ >>> src/gallium/drivers/svga/svga_format.c | 2 ++ >>> src/gallium/include/pipe/p_format.h | 3 +++ >>> src/mesa/state_tracker/st_format.c | 16 +--- >>> 4 files changed, 20 insertions(+), 3 deletions(-) >>> >> I think you'd need to update svga otherwise it will break. >> See commit 8dee325752daf1850a1f497c82b30d0574a5b612 > > The diffstat and commit message both mention svga. Do you mean > something else besides what I've already done? I seems to be blind, sincere apologies. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/6] gallium: Add support for 5551 with the 1-bit field in the low bit.
Emil Velikovwrites: > On 17 August 2017 at 17:10, Eric Anholt wrote: >> This is how VC4 stores 5551 textures, which we need to support for >> GL_OES_required_internalformat. >> >> v2: Extend commit message, fix svga driver build, add BE ordering from >> Roland. >> --- >> src/gallium/auxiliary/util/u_format.csv | 2 ++ >> src/gallium/drivers/svga/svga_format.c | 2 ++ >> src/gallium/include/pipe/p_format.h | 3 +++ >> src/mesa/state_tracker/st_format.c | 16 +--- >> 4 files changed, 20 insertions(+), 3 deletions(-) >> > I think you'd need to update svga otherwise it will break. > See commit 8dee325752daf1850a1f497c82b30d0574a5b612 The diffstat and commit message both mention svga. Do you mean something else besides what I've already done? signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/6] gallium: Add support for 5551 with the 1-bit field in the low bit.
On 17 August 2017 at 17:10, Eric Anholtwrote: > This is how VC4 stores 5551 textures, which we need to support for > GL_OES_required_internalformat. > > v2: Extend commit message, fix svga driver build, add BE ordering from > Roland. > --- > src/gallium/auxiliary/util/u_format.csv | 2 ++ > src/gallium/drivers/svga/svga_format.c | 2 ++ > src/gallium/include/pipe/p_format.h | 3 +++ > src/mesa/state_tracker/st_format.c | 16 +--- > 4 files changed, 20 insertions(+), 3 deletions(-) > I think you'd need to update svga otherwise it will break. See commit 8dee325752daf1850a1f497c82b30d0574a5b612 -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/6] gallium: Add support for 5551 with the 1-bit field in the low bit.
This is how VC4 stores 5551 textures, which we need to support for GL_OES_required_internalformat. v2: Extend commit message, fix svga driver build, add BE ordering from Roland. --- src/gallium/auxiliary/util/u_format.csv | 2 ++ src/gallium/drivers/svga/svga_format.c | 2 ++ src/gallium/include/pipe/p_format.h | 3 +++ src/mesa/state_tracker/st_format.c | 16 +--- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv index cef530aae7c3..966b34bd722e 100644 --- a/src/gallium/auxiliary/util/u_format.csv +++ b/src/gallium/auxiliary/util/u_format.csv @@ -74,6 +74,8 @@ PIPE_FORMAT_X8B8G8R8_UNORM, plain, 1, 1, x8 , un8 , un8 , un8 , wzy1, r PIPE_FORMAT_R8G8B8X8_UNORM, plain, 1, 1, un8 , un8 , un8 , x8 , xyz1, rgb PIPE_FORMAT_B5G5R5X1_UNORM, plain, 1, 1, un5 , un5 , un5 , x1 , zyx1, rgb, x1 , un5 , un5 , un5 , yzw1 PIPE_FORMAT_B5G5R5A1_UNORM, plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb, un1 , un5 , un5 , un5 , yzwx +PIPE_FORMAT_X1B5G5R5_UNORM, plain, 1, 1, x1 , un5 , un5 , un5 , wzy1, rgb, un5 , un5 , un5 , x1 , xyz1 +PIPE_FORMAT_A1B5G5R5_UNORM, plain, 1, 1, un1 , un5 , un5 , un5 , wzyx, rgb, un5 , un5 , un5 , un1 , xyzw PIPE_FORMAT_B4G4R4A4_UNORM, plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb, un4 , un4 , un4 , un4 , yzwx PIPE_FORMAT_B4G4R4X4_UNORM, plain, 1, 1, un4 , un4 , un4 , x4 , zyx1, rgb, x4 , un4 , un4 , un4 , yzw1 PIPE_FORMAT_B5G6R5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb, un5 , un6 , un5 , , xyz1 diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index 95dd04d8abd8..5b844b570e24 100644 --- a/src/gallium/drivers/svga/svga_format.c +++ b/src/gallium/drivers/svga/svga_format.c @@ -58,6 +58,7 @@ static const struct vgpu10_format_entry format_conversion_table[] = { PIPE_FORMAT_A8R8G8B8_UNORM,SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, 0 }, { PIPE_FORMAT_X8R8G8B8_UNORM,SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, 0 }, { PIPE_FORMAT_B5G5R5A1_UNORM,SVGA3D_FORMAT_INVALID, SVGA3D_B5G5R5A1_UNORM, TF_GEN_MIPS }, + { PIPE_FORMAT_A1B5G5R5_UNORM,SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, 0 }, { PIPE_FORMAT_B4G4R4A4_UNORM,SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, 0 }, { PIPE_FORMAT_B5G6R5_UNORM, SVGA3D_FORMAT_INVALID, SVGA3D_B5G6R5_UNORM, TF_GEN_MIPS }, { PIPE_FORMAT_R10G10B10A2_UNORM, SVGA3D_R10G10B10A2_UNORM, SVGA3D_R10G10B10A2_UNORM,TF_GEN_MIPS }, @@ -175,6 +176,7 @@ static const struct vgpu10_format_entry format_conversion_table[] = { PIPE_FORMAT_R5SG5SB6U_NORM,SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, 0 }, { PIPE_FORMAT_A8B8G8R8_UNORM,SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, 0 }, { PIPE_FORMAT_B5G5R5X1_UNORM,SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, 0 }, + { PIPE_FORMAT_X1B5G5R5_UNORM,SVGA3D_FORMAT_INVALID, SVGA3D_FORMAT_INVALID, 0 }, { PIPE_FORMAT_R10G10B10A2_USCALED, SVGA3D_R10G10B10A2_UNORM, SVGA3D_FORMAT_INVALID, VF_PUINT_TO_USCALED }, { PIPE_FORMAT_R11G11B10_FLOAT, SVGA3D_FORMAT_INVALID, SVGA3D_R11G11B10_FLOAT, TF_GEN_MIPS }, { PIPE_FORMAT_R9G9B9E5_FLOAT,SVGA3D_FORMAT_INVALID, SVGA3D_R9G9B9E5_SHAREDEXP, 0 }, diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h index e4e09d8b4353..515ce62e2973 100644 --- a/src/gallium/include/pipe/p_format.h +++ b/src/gallium/include/pipe/p_format.h @@ -391,6 +391,9 @@ enum pipe_format { PIPE_FORMAT_P016= 307, + PIPE_FORMAT_A1B5G5R5_UNORM = 308, + PIPE_FORMAT_X1B5G5R5_UNORM = 309, + PIPE_FORMAT_COUNT }; diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 348853affd82..0ce785575ba8 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -79,6 +79,8 @@ st_mesa_format_to_pipe_format(const struct st_context *st, mesa_format mesaForma return PIPE_FORMAT_XRGB_UNORM; case MESA_FORMAT_B5G5R5A1_UNORM: return PIPE_FORMAT_B5G5R5A1_UNORM; + case MESA_FORMAT_A1B5G5R5_UNORM: + return PIPE_FORMAT_A1B5G5R5_UNORM; case MESA_FORMAT_B4G4R4A4_UNORM: return PIPE_FORMAT_B4G4R4A4_UNORM; case MESA_FORMAT_B5G6R5_UNORM: @@ -407,6 +409,8 @@ st_mesa_format_to_pipe_format(const struct st_context *st, mesa_format mesaForma return PIPE_FORMAT_B4G4R4X4_UNORM; case MESA_FORMAT_B5G5R5X1_UNORM: return PIPE_FORMAT_B5G5R5X1_UNORM; + case MESA_FORMAT_X1B5G5R5_UNORM: + return PIPE_FORMAT_X1B5G5R5_UNORM; case MESA_FORMAT_R8G8B8X8_SNORM: return