[Mesa-dev] i965 FS back-end IR builder migration.
Kenneth Graunke
kenneth at whitecape.org
Sat Jun 6 23:00:08 PDT 2015
On Thursday, June 04, 2015 07:04:49 PM Francisco Jerez wrote:
> This series migrates the FS compiler back-end to the i965 IR builder I
> proposed a while ago as part of my ARB_shader_image_load_store series,
> and fixes a couple of bugs I found during the process. It doesn't yet
> attempt to convert the VEC4 back-end, but the VEC4 version of the
> builder is also included for completeness.
>
> For a branch in testable form see:
> http://cgit.freedesktop.org/~currojerez/mesa/log/?h=i965-ir-builder
I ran this series through my assembly diffing tool.
Keith advised me to build such a tool when I was working on another
large scale refactor (combining the Gen4-7 and Gen8+ generators), and it
proved to be invaluable - even though Piglit was passing, I found many
cases where we generated different assembly, and one or the other was
bogus. Many bugs were caught in both codebases. So I figured running
it on this refactor would be wise as well.
There are differences, but they look pretty reasonable:
bin/ext_framebuffer_multisample-alpha-to-coverage-dual-src-blend 2 -auto -fbo
bin/ext_framebuffer_multisample-alpha-to-coverage-dual-src-blend 4 -auto -fbo
bin/ext_framebuffer_multisample-alpha-to-coverage-dual-src-blend 6 -auto -fbo
bin/ext_framebuffer_multisample-alpha-to-coverage-dual-src-blend 8 -auto -fbo
bin/ext_framebuffer_multisample-alpha-to-one-dual-src-blend 2 -auto -fbo
bin/ext_framebuffer_multisample-alpha-to-one-dual-src-blend 4 -auto -fbo
bin/ext_framebuffer_multisample-alpha-to-one-dual-src-blend 6 -auto -fbo
bin/ext_framebuffer_multisample-alpha-to-one-dual-src-blend 8 -auto -fbo
^^^ These are 1Q vs. 2Q changes in SIMD16 shaders that split dual source
FB writes into two SIMD8 sends. Expected bug fix.
bin/arb_blend_func_extended-fbo-extended-blend-explicit -auto
bin/arb_blend_func_extended-fbo-extended-blend -auto
^^^ Ditto, but extra MOVs are being generated now. Looks OK.
bin/glslparsertest /home/kwg/Projects/piglit/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag pass 1.10 GL_ARB_explicit_attrib_location
bin/glslparsertest /home/kwg/Projects/piglit/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-13.frag pass 1.20 GL_ARB_explicit_attrib_location
^^^ DualSrcLow message (the first of the two split sends) now uses g2
instead of g122. Looks fine; better even.
bin/glslparsertest /home/kwg/Projects/piglit/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-gatherOffsets.frag pass 1.50 GL_ARB_gpu_shader5
^^^ It looks like register spilling happens in a different order or
something. Registers and buffer offsets get shuffled around, but
register/offset pairs always stay together. So I think it's OK.
bin/getteximage-formats init-by-rendering -auto -fbo
^^^ Has intermittent failures that appear to be unrelated to this code
(assembly differs between subsequent runs even on mesa master).
For reference, I've attached the assembly differences, in case you want
to look at any of them.
To be clear, I'm not requesting any changes based on this exercise.
--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arb_blend_func_extended-fbo-extended-blend.txt.gz
Type: application/gzip
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150606/f4afe8d6/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arb_blend_func_extended-fbo-extended-blend-explicit.txt.gz
Type: application/gzip
Size: 850 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150606/f4afe8d6/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ext_framebuffer_multisample-alpha-to-coverage-dual-src-blend__4.txt.gz
Type: application/gzip
Size: 2126 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150606/f4afe8d6/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ext_framebuffer_multisample-alpha-to-one-dual-src-blend__4.txt.gz
Type: application/gzip
Size: 2117 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150606/f4afe8d6/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fs-gatherOffsets.txt.gz
Type: application/gzip
Size: 1547 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150606/f4afe8d6/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layout-13.txt.gz
Type: application/gzip
Size: 425 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150606/f4afe8d6/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150606/f4afe8d6/attachment-0001.sig>
More information about the mesa-dev
mailing list