[Mesa-stable] [PATCH] st/query: init result data with 0
Karol Herbst
karolherbst at gmail.com
Tue Aug 29 13:58:44 UTC 2017
yeah, I already send out a "doing it in the driver" patch for this:
https://lists.freedesktop.org/archives/mesa-dev/2017-August/167798.html
On Mon, Aug 28, 2017 at 10:22 PM, Marek Olšák <maraeo at gmail.com> wrote:
> You can also call util_query_clear_result in the driver.
>
> Marek
>
> On Sat, Aug 26, 2017 at 1:15 AM, Karol Herbst <karolherbst at gmail.com> wrote:
>> otherwise the result might contain random data.
>>
>> fixes on nvc0:
>> * KHR-GL45.pipeline_statistics_query_tests_ARB.functional_default_qo_values
>> * KHR-GL45.pipeline_statistics_query_tests_ARB.functional_non_rendering_commands_do_not_affect_queries
>>
>> Signed-off-by: Karol Herbst <karolherbst at gmail.com>
>> Cc: mesa-stable at lists.freedesktop.org
>> ---
>> src/mesa/state_tracker/st_cb_queryobj.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
>> index 4c25724b5d..9a65fe7bd9 100644
>> --- a/src/mesa/state_tracker/st_cb_queryobj.c
>> +++ b/src/mesa/state_tracker/st_cb_queryobj.c
>> @@ -211,7 +211,7 @@ get_query_result(struct pipe_context *pipe,
>> struct st_query_object *stq,
>> boolean wait)
>> {
>> - union pipe_query_result data;
>> + union pipe_query_result data = { 0 };
>>
>> if (!stq->pq) {
>> /* Only needed in case we failed to allocate the gallium query earlier.
>> --
>> 2.14.1
>>
>> _______________________________________________
>> mesa-stable mailing list
>> mesa-stable at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-stable
More information about the mesa-stable
mailing list