[Mesa-dev] [PATCH 2/2] mesa/compute: drop pointless casts.
Alejandro Piñeiro
apinheiro at igalia.com
Thu May 5 07:55:52 UTC 2016
LGTM:
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
On 05/05/16 02:41, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> We already are a GLintptr, casting won't help.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/mesa/main/api_validate.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
> index d455f19..421ae8b 100644
> --- a/src/mesa/main/api_validate.c
> +++ b/src/mesa/main/api_validate.c
> @@ -1107,20 +1107,20 @@ valid_dispatch_indirect(struct gl_context *ctx,
> GLintptr indirect,
> GLsizei size, const char *name)
> {
> - GLintptr end = (GLintptr)indirect + size;
> + GLintptr end = indirect + size;
>
> /* From the OpenGL 4.3 Core Specification, Chapter 19, Compute Shaders:
> *
> * "An INVALID_VALUE error is generated if indirect is negative or is not a
> * multiple of four."
> */
> - if ((GLintptr)indirect & (sizeof(GLuint) - 1)) {
> + if (indirect & (sizeof(GLuint) - 1)) {
> _mesa_error(ctx, GL_INVALID_VALUE,
> "%s(indirect is not aligned)", name);
> return GL_FALSE;
> }
>
> - if ((GLintptr)indirect < 0) {
> + if (indirect < 0) {
> _mesa_error(ctx, GL_INVALID_VALUE,
> "%s(indirect is less than zero)", name);
> return GL_FALSE;
More information about the mesa-dev
mailing list