* [PATCH mesa v2] clover: Fix pipe_grid_info.indirect not being initialized
@ 2016-03-14 14:01 Hans de Goede
2016-03-14 14:01 ` Samuel Pitoiset
0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2016-03-14 14:01 UTC (permalink / raw)
To: Ilia Mirkin, Samuel Pitoiset
Cc: mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, 11.2,
nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
After pipe_grid_info.indirect was introduced, clover was not modified
to set it causing it to pass uninitialized memory for it to launch_grid.
This commit fixes this by zero-ing the entire pipe_grid_info struct when
declaring it, to avoid similar problems popping-up in the future.
Cc: "11.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Drop trailing "," from struct initializer
-Add Cc: "11.2" <mesa-stable@lists.freedesktop.org>
---
src/gallium/state_trackers/clover/core/kernel.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp
index 8396be9..1ab87ec 100644
--- a/src/gallium/state_trackers/clover/core/kernel.cpp
+++ b/src/gallium/state_trackers/clover/core/kernel.cpp
@@ -55,7 +55,7 @@ kernel::launch(command_queue &q,
const auto reduced_grid_size =
map(divides(), grid_size, block_size);
void *st = exec.bind(&q, grid_offset);
- struct pipe_grid_info info;
+ struct pipe_grid_info info = { 0 };
// The handles are created during exec_context::bind(), so we need make
// sure to call exec_context::bind() before retrieving them.
--
2.7.2
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH mesa v2] clover: Fix pipe_grid_info.indirect not being initialized
2016-03-14 14:01 [PATCH mesa v2] clover: Fix pipe_grid_info.indirect not being initialized Hans de Goede
@ 2016-03-14 14:01 ` Samuel Pitoiset
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Pitoiset @ 2016-03-14 14:01 UTC (permalink / raw)
To: Hans de Goede, Ilia Mirkin; +Cc: mesa-dev, 11.2, nouveau
Thanks Hans!
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
On 03/14/2016 03:01 PM, Hans de Goede wrote:
> After pipe_grid_info.indirect was introduced, clover was not modified
> to set it causing it to pass uninitialized memory for it to launch_grid.
>
> This commit fixes this by zero-ing the entire pipe_grid_info struct when
> declaring it, to avoid similar problems popping-up in the future.
>
> Cc: "11.2" <mesa-stable@lists.freedesktop.org>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> Changes in v2:
> -Drop trailing "," from struct initializer
> -Add Cc: "11.2" <mesa-stable@lists.freedesktop.org>
> ---
> src/gallium/state_trackers/clover/core/kernel.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp
> index 8396be9..1ab87ec 100644
> --- a/src/gallium/state_trackers/clover/core/kernel.cpp
> +++ b/src/gallium/state_trackers/clover/core/kernel.cpp
> @@ -55,7 +55,7 @@ kernel::launch(command_queue &q,
> const auto reduced_grid_size =
> map(divides(), grid_size, block_size);
> void *st = exec.bind(&q, grid_offset);
> - struct pipe_grid_info info;
> + struct pipe_grid_info info = { 0 };
>
> // The handles are created during exec_context::bind(), so we need make
> // sure to call exec_context::bind() before retrieving them.
>
--
-Samuel
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-14 14:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-14 14:01 [PATCH mesa v2] clover: Fix pipe_grid_info.indirect not being initialized Hans de Goede
2016-03-14 14:01 ` Samuel Pitoiset
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.