[Mesa-stable] [Mesa-dev] [PATCH 1/2] r300/compiler/tests: Fix segfault
Alex Deucher
alexdeucher at gmail.com
Wed Dec 4 09:11:32 PST 2013
On Mon, Dec 2, 2013 at 9:46 PM, Tom Stellard <tom at stellard.net> wrote:
> From: Tom Stellard <thomas.stellard at amd.com>
>
> CC: "9.2" "10.0" <mesa-stable at lists.freedesktop.org>
For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> .../r300/compiler/tests/radeon_compiler_regalloc_tests.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
> index 511596c..5306b08 100644
> --- a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
> +++ b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
> @@ -79,14 +79,13 @@ static void test_runner_rc_regalloc(
>
> static void tex_1d_swizzle(struct test_result *result)
> {
> - struct radeon_compiler c;
> + struct r300_fragment_program_compiler c;
>
> - init_compiler(&c, RC_FRAGMENT_PROGRAM, 0, 0);
> - struct r300_fragment_program_compiler *cc =
> - (struct r300_fragment_program_compiler*)&c;
> - cc->AllocateHwInputs = dummy_allocate_hw_inputs;
> + memset(&c, 0, sizeof(c));
> + init_compiler(&c.Base, RC_FRAGMENT_PROGRAM, 0, 0);
> + c.AllocateHwInputs = dummy_allocate_hw_inputs;
>
> - test_runner_rc_regalloc(result, &c, "regalloc_tex_1d_swizzle.test");
> + test_runner_rc_regalloc(result, &c.Base, "regalloc_tex_1d_swizzle.test");
> }
>
> unsigned radeon_compiler_regalloc_run_tests()
> --
> 1.8.1.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-stable
mailing list