X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Funiform_query.cpp;h=de594fcc3d7a435c8847aec98a8f8b7d6027c389;hb=15ac05fd45afb0d85f1806a77fc9ec47f4949f01;hp=14ecfdca2f3dd874cd3a78dd3f019772f4142d53;hpb=6cfa15b8031b30b987b7c62fcdbc5813765e692c;p=mesa.git diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 14ecfdca2f3..de594fcc3d7 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -26,8 +26,8 @@ #include #include /* for PRIx64 macro */ +#include -#include "main/core.h" #include "main/context.h" #include "main/shaderapi.h" #include "main/shaderobj.h" @@ -1523,10 +1523,20 @@ _mesa_uniform_handle(GLint location, GLsizei count, const GLvoid *values, /* Store the data in the "actual type" backing storage for the uniform. */ - memcpy(&uni->storage[size_mul * components * offset], values, - sizeof(uni->storage[0]) * components * count * size_mul); + gl_constant_value *storage; + if (ctx->Const.PackedDriverUniformStorage) { + for (unsigned s = 0; s < uni->num_driver_storage; s++) { + storage = (gl_constant_value *) + uni->driver_storage[s].data + (size_mul * offset * components); + memcpy(storage, values, + sizeof(uni->storage[0]) * components * count * size_mul); + } + } else { + memcpy(&uni->storage[size_mul * components * offset], values, + sizeof(uni->storage[0]) * components * count * size_mul); - _mesa_propagate_uniforms_to_driver_storage(uni, offset, count); + _mesa_propagate_uniforms_to_driver_storage(uni, offset, count); + } if (uni->type->is_sampler()) { /* Mark this bindless sampler as not bound to a texture unit because