{"disasm", IR3_DBG_DISASM, "Dump NIR and adreno shader disassembly"},
{"optmsgs", IR3_DBG_OPTMSGS, "Enable optimizer debug messages"},
{"forces2en", IR3_DBG_FORCES2EN, "Force s2en mode for tex sampler instructions"},
+ {"nouboopt", IR3_DBG_NOUBOOPT, "Disable lowering UBO to uniform"},
DEBUG_NAMED_VALUE_END
};
IR3_DBG_DISASM = 0x08,
IR3_DBG_OPTMSGS = 0x10,
IR3_DBG_FORCES2EN = 0x20,
+ IR3_DBG_NOUBOOPT = 0x40,
};
extern enum ir3_shader_debug ir3_shader_debug;
*/
#include "ir3_nir.h"
+#include "ir3_compiler.h"
#include "compiler/nir/nir.h"
#include "compiler/nir/nir_builder.h"
-#include "util/u_dynarray.h"
#include "mesa/main/macros.h"
static inline struct ir3_ubo_range
const struct ir3_ubo_range r = get_ubo_load_range(instr);
const uint32_t block = nir_src_as_uint(instr->src[0]);
+ /* if UBO lowering is disabled, we still want to lower block 0
+ * (which is normal uniforms):
+ */
+ if ((block > 0) && (ir3_shader_debug & IR3_DBG_NOUBOOPT))
+ return;
+
if (r.start < state->range[block].start)
state->range[block].start = r.start;
if (state->range[block].end < r.end)