mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
gallivm: don't cache shaders that use fetch functions.
This needs to be reworked, but it's a bit messy as we have to store all the fetch pointers to be added as globals later once gallivm has been initialised further. For now just refuse to cache shaders that hit these paths (mainly ETC1 and BPTC). Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
This commit is contained in:
parent
6c0c61cb48
commit
1b2e345110
1 changed files with 5 additions and 1 deletions
|
|
@ -54,7 +54,7 @@
|
|||
#include "lp_bld_intr.h"
|
||||
#include "lp_bld_logic.h"
|
||||
#include "lp_bld_bitarit.h"
|
||||
|
||||
#include "lp_bld_misc.h"
|
||||
|
||||
/**
|
||||
* Basic swizzling. Rearrange the order of the unswizzled array elements
|
||||
|
|
@ -835,6 +835,8 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
|||
function_type = LLVMFunctionType(ret_type, arg_types,
|
||||
ARRAY_SIZE(arg_types), 0);
|
||||
|
||||
if (gallivm->cache)
|
||||
gallivm->cache->dont_cache = true;
|
||||
/* make const pointer for the C fetch_rgba_8unorm function */
|
||||
function = lp_build_const_int_pointer(gallivm,
|
||||
func_to_pointer((func_pointer) format_desc->fetch_rgba_8unorm));
|
||||
|
|
@ -937,6 +939,8 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
|||
arg_types[2] = i32t;
|
||||
arg_types[3] = i32t;
|
||||
|
||||
if (gallivm->cache)
|
||||
gallivm->cache->dont_cache = true;
|
||||
function = lp_build_const_func_pointer(gallivm,
|
||||
func_to_pointer((func_pointer) format_desc->fetch_rgba_float),
|
||||
ret_type,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue