st_glsl_to_tgsi: check for the tail sentinel in merge_two_dsts
This fixes yet another case where DFRACEXP has only one destination. Found
by address sanitizer.
Fixes tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-frexp-dvec4-only-mantissa.shader_test
Fixes: 3b666aa747
("st/glsl_to_tgsi: fix DFRACEXP with only one destination")
Acked-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
1e508e10d9
commit
7e35bdad1c
|
@ -5252,7 +5252,7 @@ glsl_to_tgsi_visitor::merge_two_dsts(void)
|
|||
defined = 0;
|
||||
|
||||
inst2 = (glsl_to_tgsi_instruction *) inst->next;
|
||||
do {
|
||||
while (!inst2->is_tail_sentinel()) {
|
||||
if (inst->op == inst2->op &&
|
||||
inst2->dst[defined].file == PROGRAM_UNDEFINED &&
|
||||
inst->src[0].file == inst2->src[0].file &&
|
||||
|
@ -5261,9 +5261,9 @@ glsl_to_tgsi_visitor::merge_two_dsts(void)
|
|||
inst->src[0].swizzle == inst2->src[0].swizzle)
|
||||
break;
|
||||
inst2 = (glsl_to_tgsi_instruction *) inst2->next;
|
||||
} while (inst2);
|
||||
}
|
||||
|
||||
if (!inst2) {
|
||||
if (inst2->is_tail_sentinel()) {
|
||||
/* Undefined destinations are not allowed, substitute with an unused
|
||||
* temporary register.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue