mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-16 19:48:20 +02:00
Pass in the nir_src and check if it's constant, handling it via CPU-side arithmetic instead of emitting instructions. While we can constant fold these via our optimization passes, we have to do opt_algebraic to fold the binary operation with constant sources into a MOV of an immediate, then opt_copy_propagation to put it in the next expression, and so on, until the entire expression is folded. This can take several iterations of the optimization loop, which is inefficient. For example, gfxbench5/aztec-ruins/normal/7 has load/store_scratch intrinsics with constant sources, and this patch removes a number of optimization passes according to INTEL_DEBUG=optimizer. Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29624> |
||
|---|---|---|
| .. | ||
| blorp | ||
| ci | ||
| common | ||
| compiler | ||
| decoder | ||
| dev | ||
| ds | ||
| genxml | ||
| isl | ||
| nullhw-layer | ||
| perf | ||
| shaders | ||
| tools | ||
| vulkan | ||
| vulkan_hasvk | ||
| meson.build | ||