mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
r600/sfn: correct error signalling in switch default case
This is unreachable, and in release mode it should also indicated that the function will not return something useful here. Also add a default return value just in case a compiler doesn't support the "unreachable" Thanks Dieter Nützel for pointing this error out. Fixes: b6c17e2965621a46eb07ba2605d9f9e221a400b r600/sfn: lower IO for FS inputs and handle interpolation accordingly Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7820>
This commit is contained in:
parent
de353c1fbe
commit
feaecbeeab
2 changed files with 2 additions and 3 deletions
0
src/gallium/drivers/r600/sfn/sfn_nir_merge_stores.cpp
Normal file
0
src/gallium/drivers/r600/sfn/sfn_nir_merge_stores.cpp
Normal file
|
|
@ -95,15 +95,14 @@ unsigned barycentric_ij_index(nir_intrinsic_instr *instr)
|
||||||
case INTERP_MODE_SMOOTH:
|
case INTERP_MODE_SMOOTH:
|
||||||
case INTERP_MODE_COLOR:
|
case INTERP_MODE_COLOR:
|
||||||
return index;
|
return index;
|
||||||
break;
|
|
||||||
case INTERP_MODE_NOPERSPECTIVE:
|
case INTERP_MODE_NOPERSPECTIVE:
|
||||||
return index + 3;
|
return index + 3;
|
||||||
break;
|
|
||||||
case INTERP_MODE_FLAT:
|
case INTERP_MODE_FLAT:
|
||||||
case INTERP_MODE_EXPLICIT:
|
case INTERP_MODE_EXPLICIT:
|
||||||
default:
|
default:
|
||||||
assert(0 && "unknown/unsupported mode for load_interpolated");
|
unreachable("unknown/unsupported mode for load_interpolated");
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FragmentShaderFromNir::process_load_input(nir_intrinsic_instr *instr,
|
bool FragmentShaderFromNir::process_load_input(nir_intrinsic_instr *instr,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue