Discussion:
[PATCH 3/5] vc4: Add support for 5551 textures.
(too old to reply)
Eric Anholt
2017-05-02 19:33:05 UTC
Permalink
Raw Message
This keeps us from promoting them up to 8888, at the cost of not being
color-renderable.
---
src/gallium/drivers/vc4/vc4_formats.c | 5 ++---
src/gallium/drivers/vc4/vc4_uniforms.c | 1 +
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_formats.c b/src/gallium/drivers/vc4/vc4_formats.c
index 42cdad115b27..6d4a6249fbfa 100644
--- a/src/gallium/drivers/vc4/vc4_formats.c
+++ b/src/gallium/drivers/vc4/vc4_formats.c
@@ -94,9 +94,8 @@ static const struct vc4_format vc4_format_table[] = {
FORMAT(B4G4R4A4_UNORM, NO, RGBA4444, SWIZ(Y, Z, W, X)),
FORMAT(B4G4R4X4_UNORM, NO, RGBA4444, SWIZ(Y, Z, W, 1)),

- /* It looks like 5551 in the hardware is the other way around from
- * gallium.
- */
+ FORMAT(A1B5G5R5_UNORM, NO, RGBA5551, SWIZ(X, Y, Z, W)),
+ FORMAT(X1B5G5R5_UNORM, NO, RGBA5551, SWIZ(X, Y, Z, 1)),

FORMAT(A8_UNORM, NO, ALPHA, SWIZ(0, 0, 0, W)),
FORMAT(L8_UNORM, NO, ALPHA, SWIZ(W, W, W, 1)),
diff --git a/src/gallium/drivers/vc4/vc4_uniforms.c b/src/gallium/drivers/vc4/vc4_uniforms.c
index 07781b8524ea..5b5d070b5c69 100644
--- a/src/gallium/drivers/vc4/vc4_uniforms.c
+++ b/src/gallium/drivers/vc4/vc4_uniforms.c
@@ -149,6 +149,7 @@ write_texture_border_color(struct vc4_job *job,
PIPE_FORMAT_R8G8B8A8_UNORM, &uc);
break;
case VC4_TEXTURE_TYPE_RGBA4444:
+ case VC4_TEXTURE_TYPE_RGBA5551:
util_pack_color(storage_color,
PIPE_FORMAT_A8B8G8R8_UNORM, &uc);
break;
--
2.11.0
Eric Anholt
2017-05-02 19:33:04 UTC
Permalink
Raw Message
---

Do I have the swizzles right here? It's a bit complicated because I
have a reswizzle in vc4, so I may have just massaged things to work
out in my case. I tried a lot of combinations trying to specify BE
swizzles in a way that wouldn't assertion fail in the python script,
with no luck.

src/gallium/auxiliary/util/u_format.csv | 2 ++
src/gallium/include/pipe/p_format.h | 3 +++
src/mesa/state_tracker/st_format.c | 16 +++++++++++++---
3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index cef530aae7c3..e4e3f8705456 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
+PIPE_FORMAT_A1B5G5R5_UNORM , plain, 1, 1, un1 , un5 , un5 , un5 , wzyx, rgb
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/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 012f1a40151f..25162fbb9e5c 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_XRGB8888_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 PIPE_FORMAT_RGBX8888_SNORM;
case MESA_FORMAT_X8B8G8R8_SNORM:
@@ -556,6 +560,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_X8R8G8B8_UNORM;
case PIPE_FORMAT_B5G5R5A1_UNORM:
return MESA_FORMAT_B5G5R5A1_UNORM;
+ case PIPE_FORMAT_A1B5G5R5_UNORM:
+ return MESA_FORMAT_A1B5G5R5_UNORM;
case PIPE_FORMAT_B4G4R4A4_UNORM:
return MESA_FORMAT_B4G4R4A4_UNORM;
case PIPE_FORMAT_B5G6R5_UNORM:
@@ -886,6 +892,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_B4G4R4X4_UNORM;
case PIPE_FORMAT_B5G5R5X1_UNORM:
return MESA_FORMAT_B5G5R5X1_UNORM;
+ case PIPE_FORMAT_X1B5G5R5_UNORM:
+ return MESA_FORMAT_X1B5G5R5_UNORM;
case PIPE_FORMAT_RGBX8888_SNORM:
return MESA_FORMAT_R8G8B8X8_SNORM;
case PIPE_FORMAT_XBGR8888_SNORM:
@@ -1058,7 +1066,7 @@ test_format_conversion(struct st_context *st)
struct format_mapping
{
GLenum glFormats[18]; /**< list of GLenum formats, 0-terminated */
- enum pipe_format pipeFormats[13]; /**< list of pipe formats, 0-terminated */
+ enum pipe_format pipeFormats[14]; /**< list of pipe formats, 0-terminated */
};


@@ -1145,7 +1153,8 @@ static const struct format_mapping format_map[] = {
},
{
{ GL_RGB5_A1, 0 },
- { PIPE_FORMAT_B5G5R5A1_UNORM, DEFAULT_RGBA_FORMATS }
+ { PIPE_FORMAT_B5G5R5A1_UNORM, PIPE_FORMAT_A1B5G5R5_UNORM,
+ DEFAULT_RGBA_FORMATS }
},
{
{ GL_R3_G3_B2, 0 },
@@ -1159,7 +1168,8 @@ static const struct format_mapping format_map[] = {
},
{
{ GL_RGB5 },
- { PIPE_FORMAT_B5G5R5X1_UNORM, PIPE_FORMAT_B5G5R5A1_UNORM,
+ { PIPE_FORMAT_B5G5R5X1_UNORM, PIPE_FORMAT_X1B5G5R5_UNORM,
+ PIPE_FORMAT_B5G5R5A1_UNORM, PIPE_FORMAT_A1B5G5R5_UNORM,
DEFAULT_RGB_FORMATS }
},
{
--
2.11.0
Roland Scheidegger
2017-05-02 20:36:30 UTC
Permalink
Raw Message
Post by Eric Anholt
---
Do I have the swizzles right here? It's a bit complicated because I
have a reswizzle in vc4, so I may have just massaged things to work
out in my case. I tried a lot of combinations trying to specify BE
swizzles in a way that wouldn't assertion fail in the python script,
with no luck.
For BE shouldn't this just be un5,un5,un5,un1(x1),xyzw(1)?
Otherwise this looks alright to me. But don't take my word for it I
often get confused here :-).
Though you only say "1-bit field in the low bit" so I don't know what
ordering you really want - that still leaves the choice of the two
common abgr and argb orderings :-). But the name and swizzles seem to
agree here as far as I can tell...

Roland
Post by Eric Anholt
src/gallium/auxiliary/util/u_format.csv | 2 ++
src/gallium/include/pipe/p_format.h | 3 +++
src/mesa/state_tracker/st_format.c | 16 +++++++++++++---
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index cef530aae7c3..e4e3f8705456 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
+PIPE_FORMAT_A1B5G5R5_UNORM , plain, 1, 1, un1 , un5 , un5 , un5 , wzyx, rgb
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/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 012f1a40151f..25162fbb9e5c 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_XRGB8888_UNORM;
return PIPE_FORMAT_B5G5R5A1_UNORM;
+ return PIPE_FORMAT_A1B5G5R5_UNORM;
return PIPE_FORMAT_B4G4R4A4_UNORM;
@@ -407,6 +409,8 @@ st_mesa_format_to_pipe_format(const struct st_context *st, mesa_format mesaForma
return PIPE_FORMAT_B4G4R4X4_UNORM;
return PIPE_FORMAT_B5G5R5X1_UNORM;
+ return PIPE_FORMAT_X1B5G5R5_UNORM;
return PIPE_FORMAT_RGBX8888_SNORM;
@@ -556,6 +560,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_X8R8G8B8_UNORM;
return MESA_FORMAT_B5G5R5A1_UNORM;
+ return MESA_FORMAT_A1B5G5R5_UNORM;
return MESA_FORMAT_B4G4R4A4_UNORM;
@@ -886,6 +892,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_B4G4R4X4_UNORM;
return MESA_FORMAT_B5G5R5X1_UNORM;
+ return MESA_FORMAT_X1B5G5R5_UNORM;
return MESA_FORMAT_R8G8B8X8_SNORM;
@@ -1058,7 +1066,7 @@ test_format_conversion(struct st_context *st)
struct format_mapping
{
GLenum glFormats[18]; /**< list of GLenum formats, 0-terminated */
- enum pipe_format pipeFormats[13]; /**< list of pipe formats, 0-terminated */
+ enum pipe_format pipeFormats[14]; /**< list of pipe formats, 0-terminated */
};
@@ -1145,7 +1153,8 @@ static const struct format_mapping format_map[] = {
},
{
{ GL_RGB5_A1, 0 },
- { PIPE_FORMAT_B5G5R5A1_UNORM, DEFAULT_RGBA_FORMATS }
+ { PIPE_FORMAT_B5G5R5A1_UNORM, PIPE_FORMAT_A1B5G5R5_UNORM,
+ DEFAULT_RGBA_FORMATS }
},
{
{ GL_R3_G3_B2, 0 },
@@ -1159,7 +1168,8 @@ static const struct format_mapping format_map[] = {
},
{
{ GL_RGB5 },
- { PIPE_FORMAT_B5G5R5X1_UNORM, PIPE_FORMAT_B5G5R5A1_UNORM,
+ { PIPE_FORMAT_B5G5R5X1_UNORM, PIPE_FORMAT_X1B5G5R5_UNORM,
+ PIPE_FORMAT_B5G5R5A1_UNORM, PIPE_FORMAT_A1B5G5R5_UNORM,
DEFAULT_RGB_FORMATS }
},
{
Eric Anholt
2017-05-03 22:24:15 UTC
Permalink
Raw Message
Post by Roland Scheidegger
Post by Eric Anholt
---
Do I have the swizzles right here? It's a bit complicated because I
have a reswizzle in vc4, so I may have just massaged things to work
out in my case. I tried a lot of combinations trying to specify BE
swizzles in a way that wouldn't assertion fail in the python script,
with no luck.
For BE shouldn't this just be un5,un5,un5,un1(x1),xyzw(1)?
Otherwise this looks alright to me. But don't take my word for it I
often get confused here :-).
Though you only say "1-bit field in the low bit" so I don't know what
ordering you really want - that still leaves the choice of the two
common abgr and argb orderings :-). But the name and swizzles seem to
agree here as far as I can tell...
That seems to work. Not sure how I missed that option before.
Eric Anholt
2017-05-03 22:25:57 UTC
Permalink
Raw Message
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 3a2f7df24277..8bac84c07002 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 012f1a40151f..25162fbb9e5c 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_XRGB8888_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 PIPE_FORMAT_RGBX8888_SNORM;
case MESA_FORMAT_X8B8G8R8_SNORM:
@@ -556,6 +560,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_X8R8G8B8_UNORM;
case PIPE_FORMAT_B5G5R5A1_UNORM:
return MESA_FORMAT_B5G5R5A1_UNORM;
+ case PIPE_FORMAT_A1B5G5R5_UNORM:
+ return MESA_FORMAT_A1B5G5R5_UNORM;
case PIPE_FORMAT_B4G4R4A4_UNORM:
return MESA_FORMAT_B4G4R4A4_UNORM;
case PIPE_FORMAT_B5G6R5_UNORM:
@@ -886,6 +892,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_B4G4R4X4_UNORM;
case PIPE_FORMAT_B5G5R5X1_UNORM:
return MESA_FORMAT_B5G5R5X1_UNORM;
+ case PIPE_FORMAT_X1B5G5R5_UNORM:
+ return MESA_FORMAT_X1B5G5R5_UNORM;
case PIPE_FORMAT_RGBX8888_SNORM:
return MESA_FORMAT_R8G8B8X8_SNORM;
case PIPE_FORMAT_XBGR8888_SNORM:
@@ -1058,7 +1066,7 @@ test_format_conversion(struct st_context *st)
struct format_mapping
{
GLenum glFormats[18]; /**< list of GLenum formats, 0-terminated */
- enum pipe_format pipeFormats[13]; /**< list of pipe formats, 0-terminated */
+ enum pipe_format pipeFormats[14]; /**< list of pipe formats, 0-terminated */
};


@@ -1145,7 +1153,8 @@ static const struct format_mapping format_map[] = {
},
{
{ GL_RGB5_A1, 0 },
- { PIPE_FORMAT_B5G5R5A1_UNORM, DEFAULT_RGBA_FORMATS }
+ { PIPE_FORMAT_B5G5R5A1_UNORM, PIPE_FORMAT_A1B5G5R5_UNORM,
+ DEFAULT_RGBA_FORMATS }
},
{
{ GL_R3_G3_B2, 0 },
@@ -1159,7 +1168,8 @@ static const struct format_mapping format_map[] = {
},
{
{ GL_RGB5 },
- { PIPE_FORMAT_B5G5R5X1_UNORM, PIPE_FORMAT_B5G5R5A1_UNORM,
+ { PIPE_FORMAT_B5G5R5X1_UNORM, PIPE_FORMAT_X1B5G5R5_UNORM,
+ PIPE_FORMAT_B5G5R5A1_UNORM, PIPE_FORMAT_A1B5G5R5_UNORM,
DEFAULT_RGB_FORMATS }
},
{
--
2.11.0
Eric Anholt
2017-05-02 19:33:03 UTC
Permalink
Raw Message
For supporting RGB5 in hardware with A in the low bit (vc4), we need this
format as well.
---
src/mesa/main/formats.c | 2 ++
src/mesa/main/formats.csv | 1 +
src/mesa/main/formats.h | 1 +
src/mesa/main/texformat.c | 1 +
src/mesa/swrast/s_texfetch.c | 1 +
5 files changed, 6 insertions(+)

diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 9d9830f8bf45..537afa511016 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -992,6 +992,7 @@ _mesa_uncompressed_format_to_type_and_comps(mesa_format format,

case MESA_FORMAT_A1B5G5R5_UNORM:
case MESA_FORMAT_A1B5G5R5_UINT:
+ case MESA_FORMAT_X1B5G5R5_UNORM:
*datatype = GL_UNSIGNED_SHORT_5_5_5_1;
*comps = 4;
return;
@@ -2116,6 +2117,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,

case MESA_FORMAT_B4G4R4X4_UNORM:
case MESA_FORMAT_B5G5R5X1_UNORM:
+ case MESA_FORMAT_X1B5G5R5_UNORM:
case MESA_FORMAT_R8G8B8X8_SNORM:
case MESA_FORMAT_R8G8B8X8_SRGB:
case MESA_FORMAT_X8B8G8R8_SRGB:
diff --git a/src/mesa/main/formats.csv b/src/mesa/main/formats.csv
index 285921ed4457..ce53f8f05619 100644
--- a/src/mesa/main/formats.csv
+++ b/src/mesa/main/formats.csv
@@ -68,6 +68,7 @@ MESA_FORMAT_B4G4R4A4_UNORM , packed, 1, 1, 1, un4 , un4 , un4 , u
MESA_FORMAT_B4G4R4X4_UNORM , packed, 1, 1, 1, un4 , un4 , un4 , x4 , zyx1, rgb
MESA_FORMAT_A4R4G4B4_UNORM , packed, 1, 1, 1, un4 , un4 , un4 , un4 , yzwx, rgb
MESA_FORMAT_A1B5G5R5_UNORM , packed, 1, 1, 1, un1 , un5 , un5 , un5 , wzyx, rgb
+MESA_FORMAT_X1B5G5R5_UNORM , packed, 1, 1, 1, x1 , un5 , un5 , un5 , wzy1, rgb
MESA_FORMAT_B5G5R5A1_UNORM , packed, 1, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb
MESA_FORMAT_B5G5R5X1_UNORM , packed, 1, 1, 1, un5 , un5 , un5 , x1 , zyx1, rgb
MESA_FORMAT_A1R5G5B5_UNORM , packed, 1, 1, 1, un1 , un5 , un5 , un5 , yzwx, rgb
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index b88466f03685..7a7ebfd13252 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -350,6 +350,7 @@ typedef enum
MESA_FORMAT_B4G4R4X4_UNORM, /* xxxx RRRR GGGG BBBB */
MESA_FORMAT_A4R4G4B4_UNORM, /* BBBB GGGG RRRR AAAA */
MESA_FORMAT_A1B5G5R5_UNORM, /* RRRR RGGG GGBB BBBA */
+ MESA_FORMAT_X1B5G5R5_UNORM, /* BBBB BGGG GGRR RRRX */
MESA_FORMAT_B5G5R5A1_UNORM, /* ARRR RRGG GGGB BBBB */
MESA_FORMAT_B5G5R5X1_UNORM, /* xRRR RRGG GGGB BBBB */
MESA_FORMAT_A1R5G5B5_UNORM, /* BBBB BGGG GGRR RRRA */
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index baa3988f0a08..7430deeb2f54 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -88,6 +88,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
break;
case GL_RGB5_A1:
RETURN_IF_SUPPORTED(MESA_FORMAT_B5G5R5A1_UNORM);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A1B5G5R5_UNORM);
break;
case GL_RGBA2:
RETURN_IF_SUPPORTED(MESA_FORMAT_A4R4G4B4_UNORM); /* just to test another format*/
diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
index 4353ea0e4710..e2c3c085b575 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -159,6 +159,7 @@ texfetch_funcs[] =
FETCH_NULL(B4G4R4X4_UNORM),
FETCH_FUNCS(A4R4G4B4_UNORM),
FETCH_FUNCS(A1B5G5R5_UNORM),
+ FETCH_NULL(X1B5G5R5_UNORM),
FETCH_FUNCS(B5G5R5A1_UNORM),
FETCH_NULL(B5G5R5X1_UNORM),
FETCH_FUNCS(A1R5G5B5_UNORM),
--
2.11.0
Eric Anholt
2017-05-02 19:33:06 UTC
Permalink
Raw Message
Previously, we were downconverting to 8888 automatically if the hardware
didn't suport it. However, with the advent of
GL_OES_required_internalformat, we have to actually store the
internalformats we advertise support for. And, it seems rather
disingenuous to advertise the extension if we don't actually support it.
---
src/mesa/drivers/dri/i965/intel_extensions.c | 1 +
src/mesa/main/extensions_table.h | 2 +-
src/mesa/main/mtypes.h | 1 +
src/mesa/state_tracker/st_extensions.c | 5 +++++
4 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 0133fa10068e..20709952ebaf 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -111,6 +111,7 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.EXT_texture_sRGB = true;
ctx->Extensions.EXT_texture_sRGB_decode = true;
ctx->Extensions.EXT_texture_swizzle = true;
+ ctx->Extensions.EXT_texture_type_2_10_10_10_REV = true;
ctx->Extensions.EXT_vertex_array_bgra = true;
ctx->Extensions.KHR_robustness = true;
ctx->Extensions.AMD_seamless_cubemap_per_texture = true;
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 528f7308b0e4..fdc163aadb3a 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -279,7 +279,7 @@ EXT(EXT_texture_sRGB_decode , EXT_texture_sRGB_decode
EXT(EXT_texture_shared_exponent , EXT_texture_shared_exponent , GLL, GLC, x , x , 2004)
EXT(EXT_texture_snorm , EXT_texture_snorm , GLL, GLC, x , x , 2009)
EXT(EXT_texture_swizzle , EXT_texture_swizzle , GLL, GLC, x , x , 2008)
-EXT(EXT_texture_type_2_10_10_10_REV , dummy_true , x , x , x , ES2, 2008)
+EXT(EXT_texture_type_2_10_10_10_REV , EXT_texture_type_2_10_10_10_REV , x , x , x , ES2, 2008)
EXT(EXT_timer_query , EXT_timer_query , GLL, GLC, x , x , 2006)
EXT(EXT_transform_feedback , EXT_transform_feedback , GLL, GLC, x , x , 2011)
EXT(EXT_unpack_subimage , dummy_true , x , x , x , ES2, 2011)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 002e692b6994..278fa4367b87 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -4055,6 +4055,7 @@ struct gl_extensions
GLboolean EXT_texture_sRGB;
GLboolean EXT_texture_sRGB_decode;
GLboolean EXT_texture_swizzle;
+ GLboolean EXT_texture_type_2_10_10_10_REV;
GLboolean EXT_transform_feedback;
GLboolean EXT_timer_query;
GLboolean EXT_vertex_array_bgra;
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 1df2ba761682..b5d874415eae 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -765,6 +765,11 @@ void st_init_extensions(struct pipe_screen *screen,
PIPE_FORMAT_B8G8R8A8_SRGB },
GL_TRUE }, /* at least one format must be supported */

+ { { o(EXT_texture_type_2_10_10_10_REV) },
+ { PIPE_FORMAT_R10G10B10A2_UNORM,
+ PIPE_FORMAT_B10G10R10A2_UNORM },
+ GL_TRUE }, /* at least one format must be supported */
+
{ { o(ATI_texture_compression_3dc) },
{ PIPE_FORMAT_LATC2_UNORM } },
--
2.11.0
Eric Anholt
2017-05-02 19:33:07 UTC
Permalink
Raw Message
This extension is effectively a backport of GLES3's internalformat
handling to GLES 1/2. It guarantees that sized internalformats specified
for textures and renderbuffers have at least the specified size stored.
That's a pretty minimal requirement, so I think it can be dummy_true and
exposed as a standard in Mesa.

As a side effect, it also allows GL_RGB565 to be specified as a texture
format, not just as a renderbuffer. Mesa had previously been allowing 565
textures, which angered DEQP in the absence of this extension being
exposed.
---
docs/features.txt | 2 +-
src/mesa/main/extensions_table.h | 1 +
src/mesa/main/glformats.c | 78 ++++++++++++++++++++++++++++++++++------
src/mesa/main/teximage.c | 31 +++++-----------
4 files changed, 79 insertions(+), 33 deletions(-)

diff --git a/docs/features.txt b/docs/features.txt
index e18bf54a4870..e8358a6885e7 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -311,7 +311,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
GL_OES_depth_texture_cube_map DONE (all drivers that support GLSL 1.30+)
GL_OES_EGL_image DONE (all drivers)
GL_OES_EGL_image_external_essl3 not started
- GL_OES_required_internalformat not started - GLES2 extension based on OpenGL ES 3.0 feature
+ GL_OES_required_internalformat DONE (all drivers)
GL_OES_surfaceless_context DONE (all drivers)
GL_OES_texture_compression_astc DONE (core only)
GL_OES_texture_float DONE (i965, r300, r600, radeonsi, nv30, nv50, nvc0, softpipe, llvmpipe)
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index fdc163aadb3a..65048d53f52a 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -371,6 +371,7 @@ EXT(OES_point_sprite , ARB_point_sprite
EXT(OES_primitive_bounding_box , OES_primitive_bounding_box , x , x , x , 31, 2014)
EXT(OES_query_matrix , dummy_true , x , x , ES1, x , 2003)
EXT(OES_read_format , dummy_true , GLL, x , ES1, x , 2003)
+EXT(OES_required_internalformat , dummy_true , x , x , ES1, ES2, 2012)
EXT(OES_rgb8_rgba8 , dummy_true , x , x , ES1, ES2, 2005)
EXT(OES_sample_shading , OES_sample_variables , x , x , x , 30, 2014)
EXT(OES_sample_variables , OES_sample_variables , x , x , x , 30, 2014)
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 4f240206ff45..e4a981aee233 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -2778,7 +2778,7 @@ _mesa_es3_effective_internal_format_for_format_and_type(GLenum format,

/**
* Do error checking of format/type combinations for OpenGL ES 3
- * glTex[Sub]Image.
+ * glTex[Sub]Image, or ES1/ES2 with GL_OES_required_internalformat.
* \return error code, or GL_NO_ERROR.
*/
GLenum
@@ -2841,7 +2841,10 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
case GL_RGBA8:
case GL_RGB5_A1:
case GL_RGBA4:
+ break;
case GL_SRGB8_ALPHA8_EXT:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
break;
default:
return GL_INVALID_OPERATION;
@@ -2849,7 +2852,7 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_BYTE:
- if (internalFormat != GL_RGBA8_SNORM)
+ if (ctx->Version <= 20 || internalFormat != GL_RGBA8_SNORM)
return GL_INVALID_OPERATION;
break;

@@ -2885,11 +2888,13 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_HALF_FLOAT:
- if (internalFormat != GL_RGBA16F)
+ if (ctx->Version <= 20 || internalFormat != GL_RGBA16F)
return GL_INVALID_OPERATION;
break;

case GL_FLOAT:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
switch (internalFormat) {
case GL_RGBA16F:
case GL_RGBA32F:
@@ -2903,6 +2908,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_HALF_FLOAT_OES:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
if (ctx->Extensions.OES_texture_half_float && internalFormat == format)
break;
default:
@@ -2911,6 +2918,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_RGBA_INTEGER:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
switch (type) {
case GL_UNSIGNED_BYTE:
if (internalFormat != GL_RGBA8UI)
@@ -2959,7 +2968,10 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
case GL_RGB:
case GL_RGB8:
case GL_RGB565:
+ break;
case GL_SRGB8:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
break;
default:
return GL_INVALID_OPERATION;
@@ -2967,7 +2979,7 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_BYTE:
- if (internalFormat != GL_RGB8_SNORM)
+ if (ctx->Version <= 20 || internalFormat != GL_RGB8_SNORM)
return GL_INVALID_OPERATION;
break;

@@ -2982,16 +2994,18 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_UNSIGNED_INT_10F_11F_11F_REV:
- if (internalFormat != GL_R11F_G11F_B10F)
+ if (ctx->Version <= 20 || internalFormat != GL_R11F_G11F_B10F)
return GL_INVALID_OPERATION;
break;

case GL_UNSIGNED_INT_5_9_9_9_REV:
- if (internalFormat != GL_RGB9_E5)
+ if (ctx->Version <= 20 || internalFormat != GL_RGB9_E5)
return GL_INVALID_OPERATION;
break;

case GL_HALF_FLOAT:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
switch (internalFormat) {
case GL_RGB16F:
case GL_R11F_G11F_B10F:
@@ -3003,6 +3017,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_FLOAT:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
switch (internalFormat) {
case GL_RGB16F:
case GL_RGB32F:
@@ -3018,6 +3034,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_HALF_FLOAT_OES:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
if (!ctx->Extensions.OES_texture_half_float || internalFormat != format)
return GL_INVALID_OPERATION;
break;
@@ -3026,6 +3044,16 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
switch (internalFormat) {
case GL_RGB: /* GL_EXT_texture_type_2_10_10_10_REV */
break;
+ case GL_RGB10_EXT:
+ case GL_RGB8:
+ case GL_RGB565:
+ /* These seem like an odd combination to allow, but it's line 3 of
+ * Table 3.4 in the GL_OES_required_internalformat spec. GLES3
+ * doesn't do this.
+ */
+ if (ctx->Version > 20)
+ return GL_INVALID_OPERATION;
+ break;
default:
return GL_INVALID_OPERATION;
}
@@ -3037,6 +3065,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_RGB_INTEGER:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
switch (type) {
case GL_UNSIGNED_BYTE:
if (internalFormat != GL_RGB8UI)
@@ -3074,6 +3104,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_RG:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
switch (type) {
case GL_UNSIGNED_BYTE:
if (internalFormat != GL_RG8)
@@ -3121,6 +3153,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_RG_INTEGER:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
switch (type) {
case GL_UNSIGNED_BYTE:
if (internalFormat != GL_RG8UI)
@@ -3158,6 +3192,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_RED:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
switch (type) {
case GL_UNSIGNED_BYTE:
if (internalFormat != GL_R8)
@@ -3206,6 +3242,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_RED_INTEGER:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
switch (type) {
case GL_UNSIGNED_BYTE:
if (internalFormat != GL_R8UI)
@@ -3262,7 +3300,7 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_FLOAT:
- if (internalFormat != GL_DEPTH_COMPONENT32F)
+ if (ctx->Version <= 20 || internalFormat != GL_DEPTH_COMPONENT32F)
return GL_INVALID_OPERATION;
break;

@@ -3280,7 +3318,7 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
break;

case GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
- if (internalFormat != GL_DEPTH32F_STENCIL8)
+ if (ctx->Version <= 20 || internalFormat != GL_DEPTH32F_STENCIL8)
return GL_INVALID_OPERATION;
break;

@@ -3302,14 +3340,34 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
case GL_LUMINANCE_ALPHA:
switch (type) {
case GL_FLOAT:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
if (ctx->Extensions.OES_texture_float && internalFormat == format)
break;
case GL_HALF_FLOAT_OES:
+ if (ctx->Version <= 20)
+ return GL_INVALID_OPERATION;
if (ctx->Extensions.OES_texture_half_float && internalFormat == format)
break;
- default:
- if (type != GL_UNSIGNED_BYTE || format != internalFormat)
+ case GL_LUMINANCE_ALPHA:
+ if (type != GL_UNSIGNED_BYTE ||
+ !(internalFormat == GL_LUMINANCE_ALPHA ||
+ (ctx->Version <= 20 &&
+ internalFormat == GL_LUMINANCE8_ALPHA8)))
return GL_INVALID_OPERATION;
+ break;
+ case GL_LUMINANCE:
+ if (type != GL_UNSIGNED_BYTE || !(internalFormat == GL_LUMINANCE ||
+ (ctx->Version <= 20 &&
+ internalFormat == GL_LUMINANCE8)))
+ return GL_INVALID_OPERATION;
+ break;
+ case GL_ALPHA:
+ if (type != GL_UNSIGNED_BYTE || !(internalFormat == GL_ALPHA ||
+ (ctx->Version <= 20 &&
+ internalFormat == GL_ALPHA8)))
+ return GL_INVALID_OPERATION;
+ break;
}
}

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 1a00d251324f..bb395185ccd7 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1720,28 +1720,15 @@ texture_format_error_check_gles(struct gl_context *ctx, GLenum format,
GLenum type, GLenum internalFormat,
GLuint dimensions, const char *callerName)
{
- GLenum err;
-
- if (_mesa_is_gles3(ctx)) {
- err = _mesa_es3_error_check_format_and_type(ctx, format, type,
- internalFormat);
- if (err != GL_NO_ERROR) {
- _mesa_error(ctx, err,
- "%s(format = %s, type = %s, internalformat = %s)",
- callerName, _mesa_enum_to_string(format),
- _mesa_enum_to_string(type),
- _mesa_enum_to_string(internalFormat));
- return true;
- }
- }
- else {
- err = _mesa_es_error_check_format_and_type(ctx, format, type, dimensions);
- if (err != GL_NO_ERROR) {
- _mesa_error(ctx, err, "%s(format = %s, type = %s)",
- callerName, _mesa_enum_to_string(format),
- _mesa_enum_to_string(type));
- return true;
- }
+ GLenum err = _mesa_es3_error_check_format_and_type(ctx, format, type,
+ internalFormat);
+ if (err != GL_NO_ERROR) {
+ _mesa_error(ctx, err,
+ "%s(format = %s, type = %s, internalformat = %s)",
+ callerName, _mesa_enum_to_string(format),
+ _mesa_enum_to_string(type),
+ _mesa_enum_to_string(internalFormat));
+ return true;
}

return false;
--
2.11.0
Eric Anholt
2017-05-18 18:39:42 UTC
Permalink
Raw Message
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Tapani Pälli
2017-06-12 06:52:44 UTC
Permalink
Raw Message
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.

// Tapani
Tapani Pälli
2017-06-12 07:33:21 UTC
Permalink
Raw Message
Post by Tapani Pälli
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.
'36 failures' (many likely duplicates of some same issue), these ones ..

ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.bdwm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64

piglit.spec.oes_texture_float.oes_texture_float half.g965m64
piglit.spec.oes_texture_float.oes_texture_float.g965m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float half.g45m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float.g45m64
piglit.spec.oes_texture_float.oes_texture_float.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half linear.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half.ilkm64
piglit.spec.oes_texture_float.oes_texture_float linear.ilkm64

Are you able to reproduce/run these tests on some machine?

// Tapani
Eric Anholt
2017-06-13 22:12:25 UTC
Permalink
Raw Message
Post by Tapani Pälli
Post by Tapani Pälli
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.
'36 failures' (many likely duplicates of some same issue), these ones ..
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.bdwm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
piglit.spec.oes_texture_float.oes_texture_float half.g965m64
piglit.spec.oes_texture_float.oes_texture_float.g965m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float half.g45m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float.g45m64
piglit.spec.oes_texture_float.oes_texture_float.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half linear.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half.ilkm64
piglit.spec.oes_texture_float.oes_texture_float linear.ilkm64
Are you able to reproduce/run these tests on some machine?
I have a SKL desktop, so I reproduced the GLES2 rgb10 failure and fixed
it, and I think I've fixed the pre-snb failures in piglit. New branch
up at https://github.com/anholt/mesa/commits/required-internalformat
which I'll piglit now.
Tapani Pälli
2017-06-14 12:09:32 UTC
Permalink
Raw Message
Post by Eric Anholt
Post by Tapani Pälli
Post by Tapani Pälli
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.
'36 failures' (many likely duplicates of some same issue), these ones ..
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.bdwm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
piglit.spec.oes_texture_float.oes_texture_float half.g965m64
piglit.spec.oes_texture_float.oes_texture_float.g965m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float half.g45m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float.g45m64
piglit.spec.oes_texture_float.oes_texture_float.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half linear.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half.ilkm64
piglit.spec.oes_texture_float.oes_texture_float linear.ilkm64
Are you able to reproduce/run these tests on some machine?
I have a SKL desktop, so I reproduced the GLES2 rgb10 failure and fixed
it, and I think I've fixed the pre-snb failures in piglit. New branch
up at https://github.com/anholt/mesa/commits/required-internalformat
which I'll piglit now.
OK, seems the packed_pixels ones are still failing. I'll try to debug
this a bit to see what's going on.

// Tapani
Eric Anholt
2017-06-21 23:08:53 UTC
Permalink
Raw Message
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Tapani Pälli
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.
'36 failures' (many likely duplicates of some same issue), these ones ..
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.bdwm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
piglit.spec.oes_texture_float.oes_texture_float half.g965m64
piglit.spec.oes_texture_float.oes_texture_float.g965m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float half.g45m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float.g45m64
piglit.spec.oes_texture_float.oes_texture_float.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half linear.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half.ilkm64
piglit.spec.oes_texture_float.oes_texture_float linear.ilkm64
Are you able to reproduce/run these tests on some machine?
I have a SKL desktop, so I reproduced the GLES2 rgb10 failure and fixed
it, and I think I've fixed the pre-snb failures in piglit. New branch
up at https://github.com/anholt/mesa/commits/required-internalformat
which I'll piglit now.
OK, seems the packed_pixels ones are still failing. I'll try to debug
this a bit to see what's going on.
Have you had a chance to look at this at all? Or could you give me a
command line for reproducing failure? I've gone through my VK-GL-CTS
tree and DEQP trees trying various test runners with various manglings
of the names, with no luck.
Tapani Pälli
2017-08-10 06:25:33 UTC
Permalink
Raw Message
Post by Eric Anholt
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Tapani Pälli
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.
'36 failures' (many likely duplicates of some same issue), these ones ..
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.bdwm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
piglit.spec.oes_texture_float.oes_texture_float half.g965m64
piglit.spec.oes_texture_float.oes_texture_float.g965m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float half.g45m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float.g45m64
piglit.spec.oes_texture_float.oes_texture_float.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half linear.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half.ilkm64
piglit.spec.oes_texture_float.oes_texture_float linear.ilkm64
Are you able to reproduce/run these tests on some machine?
I have a SKL desktop, so I reproduced the GLES2 rgb10 failure and fixed
it, and I think I've fixed the pre-snb failures in piglit. New branch
up at https://github.com/anholt/mesa/commits/required-internalformat
which I'll piglit now.
OK, seems the packed_pixels ones are still failing. I'll try to debug
this a bit to see what's going on.
Have you had a chance to look at this at all? Or could you give me a
command line for reproducing failure? I've gone through my VK-GL-CTS
tree and DEQP trees trying various test runners with various manglings
of the names, with no luck.
Sorry I've forgotten this thread .. the 'CTS' ones are from Khronos
'OpenGL & OpenGL ES CTS' (available in gitlab) which is run by Jenkins,
are you able to access that suite?

// Tapani
Eric Anholt
2017-08-10 19:04:10 UTC
Permalink
Raw Message
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Tapani Pälli
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.
'36 failures' (many likely duplicates of some same issue), these ones ..
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.bdwm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
piglit.spec.oes_texture_float.oes_texture_float half.g965m64
piglit.spec.oes_texture_float.oes_texture_float.g965m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float half.g45m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float.g45m64
piglit.spec.oes_texture_float.oes_texture_float.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half linear.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half.ilkm64
piglit.spec.oes_texture_float.oes_texture_float linear.ilkm64
Are you able to reproduce/run these tests on some machine?
I have a SKL desktop, so I reproduced the GLES2 rgb10 failure and fixed
it, and I think I've fixed the pre-snb failures in piglit. New branch
up at https://github.com/anholt/mesa/commits/required-internalformat
which I'll piglit now.
OK, seems the packed_pixels ones are still failing. I'll try to debug
this a bit to see what's going on.
Have you had a chance to look at this at all? Or could you give me a
command line for reproducing failure? I've gone through my VK-GL-CTS
tree and DEQP trees trying various test runners with various manglings
of the names, with no luck.
Sorry I've forgotten this thread .. the 'CTS' ones are from Khronos
'OpenGL & OpenGL ES CTS' (available in gitlab) which is run by Jenkins,
are you able to access that suite?
If you mean the "OpenGL & OpenGL ES Conformance Test Suite" in gitlab
(***@gitlab.khronos.org:opengl/cts.git), that repository says:

"This project is moved to maintenance mode.

Use VK-GL-CTS for development, bug fixes"

Are you sure that's the repository you're using?
Tapani Pälli
2017-08-11 05:20:59 UTC
Permalink
Raw Message
Post by Eric Anholt
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Tapani Pälli
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.
'36 failures' (many likely duplicates of some same issue), these ones ..
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.bdwm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
piglit.spec.oes_texture_float.oes_texture_float half.g965m64
piglit.spec.oes_texture_float.oes_texture_float.g965m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float half.g45m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float.g45m64
piglit.spec.oes_texture_float.oes_texture_float.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half linear.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half.ilkm64
piglit.spec.oes_texture_float.oes_texture_float linear.ilkm64
Are you able to reproduce/run these tests on some machine?
I have a SKL desktop, so I reproduced the GLES2 rgb10 failure and fixed
it, and I think I've fixed the pre-snb failures in piglit. New branch
up at https://github.com/anholt/mesa/commits/required-internalformat
which I'll piglit now.
OK, seems the packed_pixels ones are still failing. I'll try to debug
this a bit to see what's going on.
Have you had a chance to look at this at all? Or could you give me a
command line for reproducing failure? I've gone through my VK-GL-CTS
tree and DEQP trees trying various test runners with various manglings
of the names, with no luck.
Sorry I've forgotten this thread .. the 'CTS' ones are from Khronos
'OpenGL & OpenGL ES CTS' (available in gitlab) which is run by Jenkins,
are you able to access that suite?
If you mean the "OpenGL & OpenGL ES Conformance Test Suite" in gitlab
"This project is moved to maintenance mode.
Use VK-GL-CTS for development, bug fixes"
Are you sure that's the repository you're using?
Yes, I believe that is still the repository being used with some
patches/fixes applied on top and that repository is a mixture of dEQP
and old CTS. I can see that 'vk-gl-cts' does not have these (but has
some similar tests, at least for fbo completeness). Is 'vk-gl-cts'
already used for conformance runs?

// Tapani
Mark Janes
2017-08-11 17:42:00 UTC
Permalink
Raw Message
Post by Eric Anholt
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Tapani Pälli
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.
'36 failures' (many likely duplicates of some same issue), these ones ..
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.bdwm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
piglit.spec.oes_texture_float.oes_texture_float half.g965m64
piglit.spec.oes_texture_float.oes_texture_float.g965m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float half.g45m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float.g45m64
piglit.spec.oes_texture_float.oes_texture_float.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half linear.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half.ilkm64
piglit.spec.oes_texture_float.oes_texture_float linear.ilkm64
Are you able to reproduce/run these tests on some machine?
I have a SKL desktop, so I reproduced the GLES2 rgb10 failure and fixed
it, and I think I've fixed the pre-snb failures in piglit. New branch
up at https://github.com/anholt/mesa/commits/required-internalformat
which I'll piglit now.
OK, seems the packed_pixels ones are still failing. I'll try to debug
this a bit to see what's going on.
Have you had a chance to look at this at all? Or could you give me a
command line for reproducing failure? I've gone through my VK-GL-CTS
tree and DEQP trees trying various test runners with various manglings
of the names, with no luck.
Sorry I've forgotten this thread .. the 'CTS' ones are from Khronos
'OpenGL & OpenGL ES CTS' (available in gitlab) which is run by Jenkins,
are you able to access that suite?
If you mean the "OpenGL & OpenGL ES Conformance Test Suite" in gitlab
"This project is moved to maintenance mode.
Use VK-GL-CTS for development, bug fixes"
Are you sure that's the repository you're using?
My understanding is that all the cts suites will be moving into
https://gitlab.khronos.org/Tracker/vk-gl-cts

However, that repository isn't ready yet. I tried to use it to add
OpenGL 4.6 tests to our CI, and couldn't build the suite. I was told
that a release branch for GL CTS testing would be made when the 4.6
tests are finalized.

Intel CI is just looking for regressions, so we use the sources that
made the last CTS tarballs. We do track dEQP and VulkanCTS development
branches, because we have found them to be stable enough for CI. For
dEQP, we only run tests which are not duplicated in the CTS tarballs.
Since new tests are often developed in dEQP, this *should* help us
conform whenever the vk-gl-cts repo is ready.

The packed_pixel tests were part of the CTS before dEQP was added. It's
possible that there is a bug in the tests, but we should confirm before
merging patches that could break our conformance.
Post by Eric Anholt
_______________________________________________
mesa-dev mailing list
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Eric Anholt
2017-08-14 21:04:40 UTC
Permalink
Raw Message
Post by Mark Janes
Post by Eric Anholt
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Eric Anholt
Post by Tapani Pälli
Post by Tapani Pälli
Post by Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context.
Mesa was allowing RGB565 textures, which is only valid with
GL_OES_required_internalformat. Rather than disable RGB565, I decided
the extension was easy enough to support.
I've sent one piglit test for renderbuffer sizing, and dEQP has tests
for whether enums get accepted for TexImage.
There's a functional question in patch #2, see the comment there, and
there's a question of whether the extension should be dummy_true in
patch #5.
branch: https://github.com/anholt/mesa/commits/required-internalformat
I would still love review on this series.
Earlier I took a brief look at series and run through our CI, there were
many failing tests but t seems I forgot to reply/report .. I'll run it
again and let you know what's the result.
'36 failures' (many likely duplicates of some same issue), these ones ..
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pixelstore.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo.hswm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.bdwm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.bdwm64
ES3-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES3-CTS.functional.fbo.completeness.renderable.texture.color0.rgb10.sklm64
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.sklm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.bdwm64
ES2-CTS.functional.fbo.completeness.renderable.texture.depth.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.hswm64
ES2-CTS.functional.fbo.completeness.renderable.texture.stencil.rgb10.sklm64
piglit.spec.oes_texture_float.oes_texture_float half.g965m64
piglit.spec.oes_texture_float.oes_texture_float.g965m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float linear.g965m64
piglit.spec.oes_texture_float.oes_texture_float half.g45m64
piglit.spec.oes_texture_float.oes_texture_float half linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float linear.g45m64
piglit.spec.oes_texture_float.oes_texture_float.g45m64
piglit.spec.oes_texture_float.oes_texture_float.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half linear.ilkm64
piglit.spec.oes_texture_float.oes_texture_float half.ilkm64
piglit.spec.oes_texture_float.oes_texture_float linear.ilkm64
Are you able to reproduce/run these tests on some machine?
I have a SKL desktop, so I reproduced the GLES2 rgb10 failure and fixed
it, and I think I've fixed the pre-snb failures in piglit. New branch
up at https://github.com/anholt/mesa/commits/required-internalformat
which I'll piglit now.
OK, seems the packed_pixels ones are still failing. I'll try to debug
this a bit to see what's going on.
Have you had a chance to look at this at all? Or could you give me a
command line for reproducing failure? I've gone through my VK-GL-CTS
tree and DEQP trees trying various test runners with various manglings
of the names, with no luck.
Sorry I've forgotten this thread .. the 'CTS' ones are from Khronos
'OpenGL & OpenGL ES CTS' (available in gitlab) which is run by Jenkins,
are you able to access that suite?
If you mean the "OpenGL & OpenGL ES Conformance Test Suite" in gitlab
"This project is moved to maintenance mode.
Use VK-GL-CTS for development, bug fixes"
Are you sure that's the repository you're using?
My understanding is that all the cts suites will be moving into
https://gitlab.khronos.org/Tracker/vk-gl-cts
However, that repository isn't ready yet. I tried to use it to add
OpenGL 4.6 tests to our CI, and couldn't build the suite. I was told
that a release branch for GL CTS testing would be made when the 4.6
tests are finalized.
What a mess. No wonder I couldn't find the testcase.

Using the old repository and the command line:

./glcts --deqp-caselist=ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels_pbo

I've reproduced failure. Pushed a new fixup commit to
required-internalformat and working on testing now.

Loading...