mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
nouveau/codegen: Add a 4th optimization level for MemoryOpts
MemoryOpt optimization pass makes some tests in NVK fail. Until its fixed in codegen or implemented on NIR instead, move it to a 4th level. This affects the GL driver as well, but less often. Fixes dEQP-VK.pipeline.monolithic.dynamic_control_points.change_output* Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24705>
This commit is contained in:
parent
2943bc34e9
commit
eb5cabf3ae
4 changed files with 7 additions and 6 deletions
|
|
@ -375,11 +375,11 @@ nv50_program_translate(struct nv50_program *prog, uint16_t chipset,
|
|||
info_out.driverPriv = prog;
|
||||
|
||||
#ifndef NDEBUG
|
||||
info->optLevel = debug_get_num_option("NV50_PROG_OPTIMIZE", 3);
|
||||
info->optLevel = debug_get_num_option("NV50_PROG_OPTIMIZE", 4);
|
||||
info->dbgFlags = debug_get_num_option("NV50_PROG_DEBUG", 0);
|
||||
info->omitLineNum = debug_get_num_option("NV50_PROG_DEBUG_OMIT_LINENUM", 0);
|
||||
#else
|
||||
info->optLevel = 3;
|
||||
info->optLevel = 4;
|
||||
#endif
|
||||
|
||||
ret = nv50_ir_generate_code(info, &info_out);
|
||||
|
|
|
|||
|
|
@ -594,11 +594,11 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset,
|
|||
|
||||
#ifndef NDEBUG
|
||||
info->target = debug_get_num_option("NV50_PROG_CHIPSET", chipset);
|
||||
info->optLevel = debug_get_num_option("NV50_PROG_OPTIMIZE", 3);
|
||||
info->optLevel = debug_get_num_option("NV50_PROG_OPTIMIZE", 4);
|
||||
info->dbgFlags = debug_get_num_option("NV50_PROG_DEBUG", 0);
|
||||
info->omitLineNum = debug_get_num_option("NV50_PROG_DEBUG_OMIT_LINENUM", 0);
|
||||
#else
|
||||
info->optLevel = 3;
|
||||
info->optLevel = 4;
|
||||
#endif
|
||||
|
||||
info->bin.smemSize = prog->cp.smem_size;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ struct nv50_ir_prog_info
|
|||
|
||||
uint8_t type; /* PIPE_SHADER */
|
||||
|
||||
uint8_t optLevel; /* optimization level (0 to 3) */
|
||||
uint8_t optLevel; /* optimization level (0 to 4). Level 4 enables MemoryOpt
|
||||
* which does not work well with NVK */
|
||||
uint8_t dbgFlags;
|
||||
bool omitLineNum; /* only used for printing the prog when dbgFlags is set */
|
||||
|
||||
|
|
|
|||
|
|
@ -4092,7 +4092,7 @@ Program::optimizeSSA(int level)
|
|||
RUN_PASS(2, LateAlgebraicOpt, run);
|
||||
RUN_PASS(1, LoadPropagation, run);
|
||||
RUN_PASS(1, IndirectPropagation, run);
|
||||
RUN_PASS(2, MemoryOpt, run);
|
||||
RUN_PASS(4, MemoryOpt, run);
|
||||
RUN_PASS(2, LocalCSE, run);
|
||||
RUN_PASS(0, DeadCodeElim, buryAll);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue