Hi,

> I think this check should be put in a utility function up in core Mesa 
> somewhere.  It's open-coded twice in this patch, and the check will change 
> when GL_ARB_image_load_store lands.


Would a check of the form:

inline bool
_mesa_has_atomic_ops(struct gl_context *ctx) 
{
   return ctx-> Shader._CurrentFragmentProgram != NULL &&
       ctx->Shader._CurrentFragmentProgram->NumAtomicBuffers > 0;
}

be good? 

I am hesitant to make a check that just tests for side effects since for some 
hardware (like Gen8 for example) there is not just a simple single flag to say 
"must execute frag shader", instead there are several such flags that "force to 
run fragment shader", but the flags by themselves take on other meanings; there 
was some discussion on flag things in the first posting of this patch with 
Curro and Kenneth.

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

Reply via email to