OSDN Git Service

nir/loop_analyze: Bail if we encounter swizzles
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 24 Jun 2019 21:21:07 +0000 (16:21 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Wed, 10 Jul 2019 00:20:59 +0000 (00:20 +0000)
commit9a3cb6f5fec040dea4a229b93f789995b36f9c09
tree2b5b8503c64fdda30c899437e05e79ed5da05ad1
parent6455fa9710614450ae659a28854d972330b58303
nir/loop_analyze: Bail if we encounter swizzles

None of the current code knows what to do with swizzles.  Take the safe
option for now and bail if we see one.  This does have a small shader-db
impact but it is at least safe.

Shader-db results on Kaby Lake:

    total loops in shared programs: 4364 -> 4388 (0.55%)
    loops in affected programs: 5 -> 29 (480.00%)
    helped: 5
    HURT: 29

Shader-db results on Haswell:

    total loops in shared programs: 4373 -> 4370 (-0.07%)
    loops in affected programs: 5 -> 2 (-60.00%)
    helped: 5
    HURT: 2

Fixes: 6772a17acc8ee "nir: Add a loop analysis pass"
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/nir/nir_loop_analyze.c