[Piglit] [PATCH] arb_shader_atomic_counters: add error output if uniform not found

Francisco Jerez currojerez at riseup.net
Sun Oct 4 04:40:10 PDT 2015


Timothy Arceri <t_arceri at yahoo.com.au> writes:

> Cc: Francisco Jerez <currojerez at riseup.net>
> ---
>  For some reason the lookup of this uniform is the only test that is failing
>  with my intra-stage atomic index Mesa patches. I haven't looked into why yet
>  but this will help debugging any problems in future.
>
>  tests/spec/arb_shader_atomic_counters/array-indexing.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tests/spec/arb_shader_atomic_counters/array-indexing.c b/tests/spec/arb_shader_atomic_counters/array-indexing.c
> index 030ab58..354a432 100644
> --- a/tests/spec/arb_shader_atomic_counters/array-indexing.c
> +++ b/tests/spec/arb_shader_atomic_counters/array-indexing.c
> @@ -19,7 +19,7 @@
>   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>   * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>   * IN THE SOFTWARE.
> - */
> + /
>  
>  /** @file array-indexing.c
>   *
> @@ -48,8 +48,11 @@ set_uniform_int(GLuint prog, const char *name, int value)
>          glUseProgram(prog);
>  
>          loc = glGetUniformLocation(prog, name);
> -        if (loc < 0)
> +        if (loc < 0) {
> +                fprintf(stderr, "Failed to get location for uniform '%s'.\n",
> +                name);

The indentation here looks odd, can you align the 'name' argument to the
first argument on the previous line?  With that fixed:

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

>                  return false;
> +        }
>  
>          glUniform1i(loc, value);
>  
> -- 
> 2.4.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20151004/4c2425b8/attachment.sig>


More information about the Piglit mailing list