This conflicts with:
https://patchwork.freedesktop.org/patch/161252/

Marek

On Thu, Jun 15, 2017 at 12:59 PM, Timothy Arceri <tarc...@itsqueeze.com> wrote:
> ---
>
>  I haven't tried to benchmark/profile this with anything but it makes
>  sense to try skip this if we can.
>
>  src/mesa/main/uniform_query.cpp | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
> index fed33df..364e8a0 100644
> --- a/src/mesa/main/uniform_query.cpp
> +++ b/src/mesa/main/uniform_query.cpp
> @@ -1049,21 +1049,25 @@ _mesa_uniform(GLint location, GLsizei count, const 
> GLvoid *values,
>      *     element that exceeds the highest array element index used, as
>      *     reported by GetActiveUniform, will be ignored by the GL."
>      *
>      * Clamp 'count' to a valid value.  Note that for non-arrays a count > 1
>      * will have already generated an error.
>      */
>     if (uni->array_elements != 0) {
>        count = MIN2(count, (int) (uni->array_elements - offset));
>     }
>
> -   FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
> +   FLUSH_VERTICES(ctx, 0);
> +
> +   if (uni->is_bindless || !uni->type->contains_opaque()) {
> +      ctx->NewState |= _NEW_PROGRAM_CONSTANTS;
> +   }
>
>     /* Store the data in the "actual type" backing storage for the uniform.
>      */
>     if (!uni->type->is_boolean() && !uni->is_bindless) {
>        memcpy(&uni->storage[size_mul * components * offset], values,
>               sizeof(uni->storage[0]) * components * count * size_mul);
>     } else if (uni->is_bindless) {
>        const union gl_constant_value *src =
>           (const union gl_constant_value *) values;
>        GLuint64 *dst = (GLuint64 *)&uni->storage[components * offset].i;
> --
> 2.9.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to