Re: [Mesa-dev] [PATCH 02/11] mesa: If validation fails in a debug context just emit a debug message

2016-06-15 Thread Ilia Mirkin
On Tue, Jun 14, 2016 at 10:01 PM, Ian Romanick  wrote:
> From: Ian Romanick 
>
> There are quite a few pipelines that desktop applications (including a
> bunch of piglit test) can expect to have run but don't meet the GLES
> requirements.  Instead of failing validation, just emit a debug message.
>
> Signed-off-by: Ian Romanick 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96358
> Cc: "12.0" 
> Cc: Gregory Hainaut 
> Cc: Ilia Mirkin 
> ---
>  src/mesa/main/pipelineobj.c | 17 +++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
> index 5a46cfe..9ecbcc9 100644
> --- a/src/mesa/main/pipelineobj.c
> +++ b/src/mesa/main/pipelineobj.c
> @@ -929,8 +929,21 @@ _mesa_validate_program_pipeline(struct gl_context* ctx,
>  * application has created a debug context.
>  */
> if ((_mesa_is_gles(ctx) || (ctx->Const.ContextFlags & 
> GL_CONTEXT_FLAG_DEBUG_BIT)) &&
> -   !_mesa_validate_pipeline_io(pipe))
> -  return GL_FALSE;
> +   !_mesa_validate_pipeline_io(pipe)) {
> +  if (_mesa_is_gles(ctx))
> + return GL_FALSE;
> +
> +  static GLuint msg_id = 0;
> +
> +  _mesa_gl_debug(ctx, _id,
> + MESA_DEBUG_SOURCE_API,
> + MESA_DEBUG_TYPE_PORTABILITY,
> + MESA_DEBUG_SEVERITY_MEDIUM,
> + "glValidateProgramPipeline: pipeline %u does not meet "
> + "strict OpenGL ES 3.1 requirements and may not be "
> + "portable across desktop hardware\n",

Hmmm... seems really weird to stick newlines into strings that are
supposed to be fed into callback functions and not necessarily just
printed out. It does seem like a lot of the existing ones do this as
well though. Either way,

Reviewed-by: Ilia Mirkin 

> + pipe->Name);
> +   }
>
> pipe->Validated = GL_TRUE;
> return GL_TRUE;
> --
> 2.5.5
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 02/11] mesa: If validation fails in a debug context just emit a debug message

2016-06-14 Thread Timothy Arceri
On Tue, 2016-06-14 at 19:01 -0700, Ian Romanick wrote:
> From: Ian Romanick 
> 
> There are quite a few pipelines that desktop applications (including
> a
> bunch of piglit test) can expect to have run but don't meet the GLES
> requirements.  Instead of failing validation, just emit a debug
> message.
> 
> Signed-off-by: Ian Romanick 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96358
> Cc: "12.0" 
> Cc: Gregory Hainaut 
> Cc: Ilia Mirkin 

Patches 1-2 are:

Reviewed-by: Timothy Arceri 

> ---
>  src/mesa/main/pipelineobj.c | 17 +++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/main/pipelineobj.c
> b/src/mesa/main/pipelineobj.c
> index 5a46cfe..9ecbcc9 100644
> --- a/src/mesa/main/pipelineobj.c
> +++ b/src/mesa/main/pipelineobj.c
> @@ -929,8 +929,21 @@ _mesa_validate_program_pipeline(struct
> gl_context* ctx,
>  * application has created a debug context.
>  */
> if ((_mesa_is_gles(ctx) || (ctx->Const.ContextFlags &
> GL_CONTEXT_FLAG_DEBUG_BIT)) &&
> -   !_mesa_validate_pipeline_io(pipe))
> -  return GL_FALSE;
> +   !_mesa_validate_pipeline_io(pipe)) {
> +  if (_mesa_is_gles(ctx))
> + return GL_FALSE;
> +
> +  static GLuint msg_id = 0;
> +
> +  _mesa_gl_debug(ctx, _id,
> + MESA_DEBUG_SOURCE_API,
> + MESA_DEBUG_TYPE_PORTABILITY,
> + MESA_DEBUG_SEVERITY_MEDIUM,
> + "glValidateProgramPipeline: pipeline %u does
> not meet "
> + "strict OpenGL ES 3.1 requirements and may not
> be "
> + "portable across desktop hardware\n",
> + pipe->Name);
> +   }
>  
> pipe->Validated = GL_TRUE;
> return GL_TRUE;
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 02/11] mesa: If validation fails in a debug context just emit a debug message

2016-06-14 Thread Ian Romanick
From: Ian Romanick 

There are quite a few pipelines that desktop applications (including a
bunch of piglit test) can expect to have run but don't meet the GLES
requirements.  Instead of failing validation, just emit a debug message.

Signed-off-by: Ian Romanick 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96358
Cc: "12.0" 
Cc: Gregory Hainaut 
Cc: Ilia Mirkin 
---
 src/mesa/main/pipelineobj.c | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index 5a46cfe..9ecbcc9 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -929,8 +929,21 @@ _mesa_validate_program_pipeline(struct gl_context* ctx,
 * application has created a debug context.
 */
if ((_mesa_is_gles(ctx) || (ctx->Const.ContextFlags & 
GL_CONTEXT_FLAG_DEBUG_BIT)) &&
-   !_mesa_validate_pipeline_io(pipe))
-  return GL_FALSE;
+   !_mesa_validate_pipeline_io(pipe)) {
+  if (_mesa_is_gles(ctx))
+ return GL_FALSE;
+
+  static GLuint msg_id = 0;
+
+  _mesa_gl_debug(ctx, _id,
+ MESA_DEBUG_SOURCE_API,
+ MESA_DEBUG_TYPE_PORTABILITY,
+ MESA_DEBUG_SEVERITY_MEDIUM,
+ "glValidateProgramPipeline: pipeline %u does not meet "
+ "strict OpenGL ES 3.1 requirements and may not be "
+ "portable across desktop hardware\n",
+ pipe->Name);
+   }
 
pipe->Validated = GL_TRUE;
return GL_TRUE;
-- 
2.5.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev