Re: [Mesa-dev] [v4 PATCH 07/10] mesa: function for testing if current frag-shader has atomics

2015-06-09 Thread Ian Romanick
This patch is

Reviewed-by: Ian Romanick 

On 05/27/2015 02:49 AM, Kevin Rogovin wrote:
> Add helper function that checks if current fragment shader active
> of gl_context has atomic buffer access.
> 
> v3:
>  Added in v3 of patch series.
> 
> v4:
>  Formatting fixes.
> 
> Signed-off-by: Kevin Rogovin 
> ---
>  src/mesa/main/mtypes.h | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 08316dc..4edba00 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -4462,7 +4462,12 @@ enum _debug
> DEBUG_INCOMPLETE_FBO = (1 << 3)
>  };
>  
> -
> +static inline bool
> +_mesa_active_fragment_shader_has_atomic_ops(const struct gl_context *ctx)
> +{
> +   return ctx->Shader._CurrentFragmentProgram != NULL &&
> +  ctx->Shader._CurrentFragmentProgram->NumAtomicBuffers > 0;
> +}
>  
>  #ifdef __cplusplus
>  }
> 

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


[Mesa-dev] [v4 PATCH 07/10] mesa: function for testing if current frag-shader has atomics

2015-05-27 Thread Kevin Rogovin
Add helper function that checks if current fragment shader active
of gl_context has atomic buffer access.

v3:
 Added in v3 of patch series.

v4:
 Formatting fixes.

Signed-off-by: Kevin Rogovin 
---
 src/mesa/main/mtypes.h | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 08316dc..4edba00 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -4462,7 +4462,12 @@ enum _debug
DEBUG_INCOMPLETE_FBO = (1 << 3)
 };
 
-
+static inline bool
+_mesa_active_fragment_shader_has_atomic_ops(const struct gl_context *ctx)
+{
+   return ctx->Shader._CurrentFragmentProgram != NULL &&
+  ctx->Shader._CurrentFragmentProgram->NumAtomicBuffers > 0;
+}
 
 #ifdef __cplusplus
 }
-- 
1.9.1

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