diff options
author | Tom Stellard <[email protected]> | 2013-12-02 21:04:42 -0500 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-12-09 17:28:09 -0800 |
commit | 331a8a35864c2aae808ed49ae3dfe3d58a49db6e (patch) | |
tree | 011a5db86f78f0ec63246263ca4c71a71dd133a2 /src/gallium | |
parent | f528981f1a9534c5aaf1256b380170700bf8b70f (diff) |
r300/compiler/tests: Fix segfault
Reviewed-by: Alex Deucher <[email protected]>
CC: "9.2" "10.0" <[email protected]>
(cherry picked from commit 1896431f7933e727a0f75c0e0a2da4c580a04a72)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c | 11 |
1 files 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 511596ce8b5..5306b08aa7c 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() |