llvmpipe: fix native vector width init
this otherwise causes infinite loops in subgroup tests
and kills ci
Fixes: 4a056807bc
("gallivm: break out native vector width calc for reuse")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22767>
This commit is contained in:

committed by
Marge Bot

parent
78ea6220a7
commit
e9864d7f39
@@ -421,18 +421,22 @@ fail:
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
lp_build_get_native_width(void)
|
lp_build_init_native_width(void)
|
||||||
{
|
{
|
||||||
// Default to 256 until we're confident llvmpipe with 512 is as correct and not slower than 256
|
// Default to 256 until we're confident llvmpipe with 512 is as correct and not slower than 256
|
||||||
unsigned vector_width = MIN2(util_get_cpu_caps()->max_vector_bits, 256);
|
lp_native_vector_width = MIN2(util_get_cpu_caps()->max_vector_bits, 256);
|
||||||
|
assert(lp_native_vector_width);
|
||||||
|
|
||||||
vector_width = debug_get_num_option("LP_NATIVE_VECTOR_WIDTH", vector_width);
|
lp_native_vector_width = debug_get_num_option("LP_NATIVE_VECTOR_WIDTH", lp_native_vector_width);
|
||||||
return vector_width;
|
assert(lp_native_vector_width);
|
||||||
|
|
||||||
|
return lp_native_vector_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
lp_build_init(void)
|
lp_build_init(void)
|
||||||
{
|
{
|
||||||
|
lp_build_init_native_width();
|
||||||
if (gallivm_initialized)
|
if (gallivm_initialized)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@@ -449,8 +453,6 @@ lp_build_init(void)
|
|||||||
|
|
||||||
lp_set_target_options();
|
lp_set_target_options();
|
||||||
|
|
||||||
lp_native_vector_width = lp_build_get_native_width();
|
|
||||||
|
|
||||||
#if DETECT_ARCH_PPC_64
|
#if DETECT_ARCH_PPC_64
|
||||||
/* Set the NJ bit in VSCR to 0 so denormalized values are handled as
|
/* Set the NJ bit in VSCR to 0 so denormalized values are handled as
|
||||||
* specified by IEEE standard (PowerISA 2.06 - Section 6.3). This guarantees
|
* specified by IEEE standard (PowerISA 2.06 - Section 6.3). This guarantees
|
||||||
|
@@ -69,7 +69,7 @@ struct gallivm_state
|
|||||||
};
|
};
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
lp_build_get_native_width(void);
|
lp_build_init_native_width(void);
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
lp_build_init(void);
|
lp_build_init(void);
|
||||||
|
@@ -1114,7 +1114,7 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
|
|||||||
|
|
||||||
snprintf(screen->renderer_string, sizeof(screen->renderer_string),
|
snprintf(screen->renderer_string, sizeof(screen->renderer_string),
|
||||||
"llvmpipe (LLVM " MESA_LLVM_VERSION_STRING ", %u bits)",
|
"llvmpipe (LLVM " MESA_LLVM_VERSION_STRING ", %u bits)",
|
||||||
lp_build_get_native_width() );
|
lp_build_init_native_width() );
|
||||||
|
|
||||||
list_inithead(&screen->ctx_list);
|
list_inithead(&screen->ctx_list);
|
||||||
(void) mtx_init(&screen->ctx_mutex, mtx_plain);
|
(void) mtx_init(&screen->ctx_mutex, mtx_plain);
|
||||||
|
Reference in New Issue
Block a user