From d7e37389bcb26bc56932438da3ca0b5d44aedeb1 Mon Sep 17 00:00:00 2001 From: M Henning Date: Fri, 17 Feb 2023 17:32:12 -0500 Subject: [PATCH] nv50/codegen: Set lower_uniforms_to_ubo Reviewed-by: Karol Herbst Part-of: --- src/nouveau/codegen/nv50_ir_from_nir.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/nouveau/codegen/nv50_ir_from_nir.cpp b/src/nouveau/codegen/nv50_ir_from_nir.cpp index faf756d..0d492dd 100644 --- a/src/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/nouveau/codegen/nv50_ir_from_nir.cpp @@ -1695,16 +1695,6 @@ Converter::visit(nir_intrinsic_instr *insn) unsigned dest_components = nir_intrinsic_dest_components(insn); switch (op) { - case nir_intrinsic_load_uniform: { - LValues &newDefs = convert(&insn->dest); - const DataType dType = getDType(insn); - Value *indirect; - uint32_t coffset = getIndirect(insn, 0, 0, indirect); - for (uint8_t i = 0; i < dest_components; ++i) { - loadFrom(FILE_MEMORY_CONST, 0, dType, newDefs[i], 16 * coffset, i, indirect); - } - break; - } case nir_intrinsic_store_output: case nir_intrinsic_store_per_vertex_output: { Value *indirect; @@ -2062,7 +2052,7 @@ Converter::visit(nir_intrinsic_instr *insn) LValues &newDefs = convert(&insn->dest); Value *indirectIndex; Value *indirectOffset; - uint32_t index = getIndirect(&insn->src[0], 0, indirectIndex) + 1; + uint32_t index = getIndirect(&insn->src[0], 0, indirectIndex); uint32_t offset = getIndirect(&insn->src[1], 0, indirectOffset); if (indirectOffset) indirectOffset = mkOp1v(OP_MOV, TYPE_U32, getSSA(4, FILE_ADDRESS), indirectOffset); @@ -3524,6 +3514,7 @@ nvir_nir_shader_compiler_options(int chipset, uint8_t shader_type, bool prefer_n op.has_imul24 = false; op.has_fmulz = (prefer_nir && (chipset > NVISA_G80_CHIPSET)); op.intel_vec4 = false; + op.lower_uniforms_to_ubo = true; op.force_indirect_unrolling = (nir_variable_mode) ( ((shader_type == PIPE_SHADER_FRAGMENT) ? nir_var_shader_out : 0) | /* HW doesn't support indirect addressing of fragment program inputs -- 2.7.4