mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-30 11:00:40 +00:00
svga: fix bitwise/logical and mixup
The function need_temp_reg_initialization looks suspecious. It will only ever return true if we get past this if: if (!(emit->info.indirect_files && (1u << TGSI_FILE_TEMPORARY)) ... Using the logical && means the intended initialization done based on the result of this check is not performed. This code was both introduced and altered in MR 5317.ccb4ea5a
introduces the function.ba37d408
is a collection of performance improvements and misc fixes. This altered the if from using bitwise to logical and. This commit changes it back to bitwise. Spotted from a compile warning. Fixes:ba37d408da
("svga: Performance fixes") Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12157>
This commit is contained in:
parent
6b4294daf0
commit
64292c0f05
@ -1450,7 +1450,7 @@ static boolean
|
||||
need_temp_reg_initialization(struct svga_shader_emitter_v10 *emit,
|
||||
unsigned index)
|
||||
{
|
||||
if (!(emit->info.indirect_files && (1u << TGSI_FILE_TEMPORARY))
|
||||
if (!(emit->info.indirect_files & (1u << TGSI_FILE_TEMPORARY))
|
||||
&& emit->current_loop_depth == 0) {
|
||||
if (!emit->temp_map[index].initialized &&
|
||||
emit->temp_map[index].index < emit->num_shader_temps) {
|
||||
|
Loading…
Reference in New Issue
Block a user