The first 7 patches in this series put GLSL-to-NIR on a small diet. I looked at the giant sequense of 'if (strcmp(...) == 0) { ... } else if (strcmp(...) == 0) { ...' and said, "Oh hell no." I don't think we care much about the performance of this code, so I opted to tune for size. Using an in-code radix trie gets it about as small as I think it can get. The result is -784 bytes in a single function. All 41 strings just disappear.
It looks like src/mesa/state_tracker/st_glsl_to_tgsi.cpp could get similar treatment, and the savings there should be even larger. My recommendation would be to copy src/compiler/glsl/nir_intrinsic_map.py into src/mesa/state_tracker and change it to suit the needs of that code. The hard part is already done. :) The rest of the series adds the new intrinsics to NIR and to the i965 driver. What we don't have is a good set of piglit tests for the new intrinsics. We also might not have tests for the existing flavors of the new intrinsics on, for example, SSBOs. There is a test for atomicCounterAddARB. I think it's going to be fairly difficult to come up with good tests for the other functions. I'll have to think about it some more. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev