* [igt-dev] [PATCH i-g-t v2 0/2] Shaders documentation
@ 2018-06-15 9:12 Katarzyna Dec
2018-06-15 9:12 ` [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders Katarzyna Dec
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Katarzyna Dec @ 2018-06-15 9:12 UTC (permalink / raw)
To: igt-dev
Since discussion about hw-tests directory is still going, I am
submitting shaders documentation as a single patch.
Let me know if this documentation is ok.
Any feedback is welcome.
v2: After talking with Chris Wilson on IRC we agreed that it would be
worth to move whole shaders directory to lib/i915/.
Kasia :)
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Katarzyna Dec (2):
shaders: Add assembler instructions and update README for shaders
lib/i915: Move shaders directory
lib/i915/shaders/README | 37 ++++++++++++++++++++++
lib/i915/shaders/gpgpu/README | 15 +++++++++
{shaders => lib/i915/shaders}/gpgpu/gpgpu_fill.gxa | 0
lib/i915/shaders/gpgpu/gpgpu_fill_gen8.asm | 10 ++++++
lib/i915/shaders/gpgpu/gpgpu_fill_gen9.asm | 10 ++++++
lib/i915/shaders/media/README | 14 ++++++++
{shaders => lib/i915/shaders}/media/media_fill.gxa | 0
lib/i915/shaders/media/media_fill_gen8.asm | 11 +++++++
lib/i915/shaders/ps/README | 9 ++++++
{shaders => lib/i915/shaders}/ps/blit.g7a | 0
lib/i915/shaders/ps/blit_gen8.asm | 7 ++++
lib/i915/shaders/ps/neg1_gen8.asm | 9 ++++++
{shaders => lib/i915/shaders}/ps/neg1_test.g7a | 0
shaders/gpgpu/README | 4 ---
shaders/media/README | 5 ---
shaders/ps/README | 1 -
16 files changed, 122 insertions(+), 10 deletions(-)
create mode 100644 lib/i915/shaders/README
create mode 100644 lib/i915/shaders/gpgpu/README
rename {shaders => lib/i915/shaders}/gpgpu/gpgpu_fill.gxa (100%)
create mode 100644 lib/i915/shaders/gpgpu/gpgpu_fill_gen8.asm
create mode 100644 lib/i915/shaders/gpgpu/gpgpu_fill_gen9.asm
create mode 100644 lib/i915/shaders/media/README
rename {shaders => lib/i915/shaders}/media/media_fill.gxa (100%)
create mode 100644 lib/i915/shaders/media/media_fill_gen8.asm
create mode 100644 lib/i915/shaders/ps/README
rename {shaders => lib/i915/shaders}/ps/blit.g7a (100%)
create mode 100644 lib/i915/shaders/ps/blit_gen8.asm
create mode 100644 lib/i915/shaders/ps/neg1_gen8.asm
rename {shaders => lib/i915/shaders}/ps/neg1_test.g7a (100%)
delete mode 100644 shaders/gpgpu/README
delete mode 100644 shaders/media/README
delete mode 100644 shaders/ps/README
--
2.14.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 12+ messages in thread* [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders 2018-06-15 9:12 [igt-dev] [PATCH i-g-t v2 0/2] Shaders documentation Katarzyna Dec @ 2018-06-15 9:12 ` Katarzyna Dec 2018-06-15 9:19 ` Chris Wilson 2018-06-15 9:13 ` [igt-dev] [PATCH i-g-t v2 2/2] lib/i915: Move shaders directory Katarzyna Dec ` (2 subsequent siblings) 3 siblings, 1 reply; 12+ messages in thread From: Katarzyna Dec @ 2018-06-15 9:12 UTC (permalink / raw) To: igt-dev We're not planning to work on assembler in igt anymore, since we can reuse an existing project (IGA) that will do this work for us. The only extra thing we need to do is convert the result binary to C-array, simple python script. Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> --- shaders/README | 37 +++++++++++++++++++++++++++++++++++++ shaders/gpgpu/README | 11 +++++++++++ shaders/gpgpu/gpgpu_fill_gen8.asm | 10 ++++++++++ shaders/gpgpu/gpgpu_fill_gen9.asm | 10 ++++++++++ shaders/media/README | 9 +++++++++ shaders/media/media_fill_gen8.asm | 11 +++++++++++ shaders/ps/README | 8 ++++++++ shaders/ps/blit_gen8.asm | 7 +++++++ shaders/ps/neg1_gen8.asm | 9 +++++++++ 9 files changed, 112 insertions(+) create mode 100644 shaders/README create mode 100644 shaders/gpgpu/gpgpu_fill_gen8.asm create mode 100644 shaders/gpgpu/gpgpu_fill_gen9.asm create mode 100644 shaders/media/media_fill_gen8.asm create mode 100644 shaders/ps/blit_gen8.asm create mode 100644 shaders/ps/neg1_gen8.asm diff --git a/shaders/README b/shaders/README new file mode 100644 index 00000000..9e6bf410 --- /dev/null +++ b/shaders/README @@ -0,0 +1,37 @@ +This directory is for shaders used in media_fill, gpgpu_fill, rendercopy +and media_spin libraries. + +Till Gen8 shaders were generated using intel-gen4asm script (implementation in +assembler/ directory). From Gen8 it is possible to use Intel Graphics Assembler +to generate binary from asm instructions +https://github.com/intel/intel-graphics-compiler/tree/master/visa/iga +Clone and build this project to use IGA. + +where to find IGA binary TODO: add path + +For maintaining compatibility with our tests there is a bin to hex converter +written in python. +Instructions how to build media, gpgpu or ps shaders included in their +subdirectories. + +Converter: +#!/usr/bin/env python2 +import struct +import sys + +print "static const uint32_t kernel[][4] = {" + +with open(sys.argv[1], 'r') as f: + fmt = '<LLLL' + step = struct.calcsize(fmt) + while True: + buf = f.read(step) + if not buf: + break + elif len(buf) < step: + buf += '\x00' * (step - len(buf)) + + val = struct.unpack('<LLLL', buf) + print "\t{{ 0x{:08x}, 0x{:08x}, 0x{:08x}, 0x{:08x} }},".format(*val) + +print "};" \ No newline at end of file diff --git a/shaders/gpgpu/README b/shaders/gpgpu/README index 3bf328ad..91aca7e8 100644 --- a/shaders/gpgpu/README +++ b/shaders/gpgpu/README @@ -1,4 +1,15 @@ +These files are here for reference only. Commands used to generate the shader on gen7 $> m4 gpgpu_fill.gxa > gpgpu_fill.gxm $> intel-gen4asm -g 7 -o <output> gpgpu_fill.gxm + +From gen8 we can use Intel Graphics Assember to generate binary from asm +instructions +https://github.com/intel/intel-graphics-compiler/tree/master/visa/iga. + + +How to get binary from .asm (e.g. when ISA instructions has changed): + $> iga64 gpgpu_fill.asm -p=8 -a -o gpgpu_fill_gen8.bin + $> Use converter from shaders/README to have hex array used in libs + $> Copy output to proper lib diff --git a/shaders/gpgpu/gpgpu_fill_gen8.asm b/shaders/gpgpu/gpgpu_fill_gen8.asm new file mode 100644 index 00000000..448e0256 --- /dev/null +++ b/shaders/gpgpu/gpgpu_fill_gen8.asm @@ -0,0 +1,10 @@ + mov (4|M0) r1.0<1>:ub r1.0<0;1,0>:ub + mul (1|M0) r2.0<1>:ud r0.1<0;1,0>:ud 0x10:ud + mov (1|M0) r2.1<1>:ud r0.6<0;1,0>:ud + mov (8|M0) r4.0<1>:ud r0.0<8;8,1>:ud + mov (2|M0) r4.0<1>:ud r2.0<2;2,1>:ud + mov (1|M0) r4.2<1>:ud 0xF:ud + mov (16|M0) (eq)f0.0 r5.0<1>:ud r1.0<0;1,0>:ud + send (16|M0) acc0.0:uw r4:d 0xC 0x060A8000 // DP_DC1 wr:3h, rd:0, fc: 0x28000 + mov (8|M0) r112.0<1>:ud r0.0<8;8,1>:ud + send (16|M0) null:uw r112:d 0x27 0x02000010 {EOT} // SPAWNER wr:1, rd:0, fc: 0x10 diff --git a/shaders/gpgpu/gpgpu_fill_gen9.asm b/shaders/gpgpu/gpgpu_fill_gen9.asm new file mode 100644 index 00000000..6f948935 --- /dev/null +++ b/shaders/gpgpu/gpgpu_fill_gen9.asm @@ -0,0 +1,10 @@ + mov (4|M0) r1.0<1>:ub r1.0<0;1,0>:ub + mul (1|M0) r2.0<1>:ud r0.1<0;1,0>:ud 0x10:ud + mov (1|M0) r2.1<1>:ud r0.6<0;1,0>:ud + mov (8|M0) r4.0<1>:ud r0.0<8;8,1>:ud + mov (2|M0) r4.0<1>:ud r2.0<2;2,1>:ud + mov (1|M0) r4.2<1>:ud 0xF:ud + mov (16|M0) r5.0<1>:ud r1.0<0;1,0>:ud + send (16|M0) acc0.0:uw r4:d 0xC 0x060A8000 // DP_DC1 wr:3h, rd:0, fc: 0x28000 + mov (8|M0) r112.0<1>:ud r0.0<8;8,1>:ud + send (16|M0) null:uw r112:d 0x27 0x02000010 {EOT} // SPAWNER wr:1, rd:0, fc: 0x10 diff --git a/shaders/media/README b/shaders/media/README index 9f296010..dff53bd0 100644 --- a/shaders/media/README +++ b/shaders/media/README @@ -3,3 +3,12 @@ These files are here for reference only. Commands used to generate the shader on gen8 $> m4 media_fill.gxa > media_fill.gxm $> intel-gen4asm -g 8 -o <output> media_fill.gxm + +From gen8 we can use Intel Graphics Assember to generate binary from asm +instructions https://github.com/intel/intel-graphics-compiler/tree/master/visa/iga. + +How to get binary from .asm (e.g. when ISA instructions has changed): + $> iga64 media_fill_gen8.asm -p=8 -a -o media_fill_gen8.bin + $> Use converter from shaders/README to have hex array used in libs + $> Copy output to proper lib + diff --git a/shaders/media/media_fill_gen8.asm b/shaders/media/media_fill_gen8.asm new file mode 100644 index 00000000..4b6eb84b --- /dev/null +++ b/shaders/media/media_fill_gen8.asm @@ -0,0 +1,11 @@ + mov (4|M0) r1.0<1>:ub r1.0<0;1,0>:ub + mov (8|M0) r4.0<1>:ud r0.0<8;8,1>:ud + mov (2|M0) r4.0<1>:ud r2.0<2;2,1>:ud + mov (1|M0) r4.2<1>:ud 0xF000F:ud + mov (16|M0) r5.0<1>:ud r1.0<0;1,0>:ud + mov (16|M0) r7.0<1>:ud r1.0<0;1,0>:ud + mov (16|M0) r9.0<1>:ud r1.0<0;1,0>:ud + mov (16|M0) r11.0<1>:ud r1.0<0;1,0>:ud + send (16|M0) acc0.0:uw r4:d 0x1000000C 0x120A8000 // DP_DC1 wr:9h, rd:0, fc: 0x28000 + mov (8|M0) r112.0<1>:ud r0.0<8;8,1>:ud + send (16|M0) null:uw r112:d 0x10000027 0x02000010 {EOT} // SPAWNER wr:1, rd:0, fc: 0x10 diff --git a/shaders/ps/README b/shaders/ps/README index b196d025..a4be135d 100644 --- a/shaders/ps/README +++ b/shaders/ps/README @@ -1 +1,9 @@ These files are here for reference only. + +From gen8 we can use Intel Graphics Assember to generate binary from asm +instructions https://github.com/intel/intel-graphics-compiler/tree/master/visa/iga. + +How to get binary from .asm? + $> iga64 blit_gen8.asm -p=8 -a -o blit_gen8.bin + $> Use converter from shaders/README to have hex array used in libs + $> Copy output to proper lib diff --git a/shaders/ps/blit_gen8.asm b/shaders/ps/blit_gen8.asm new file mode 100644 index 00000000..c35b70a1 --- /dev/null +++ b/shaders/ps/blit_gen8.asm @@ -0,0 +1,7 @@ + pln (8|M0) r10.0<1>:f r6.0<0;1,0>:f r2.0<8;8,1>:f + pln (8|M0) r11.0<1>:f r6.0<0;1,0>:f r4.0<8;8,1>:f + pln (8|M0) r12.0<1>:f r6.4<0;1,0>:f r2.0<8;8,1>:f + pln (8|M0) 13.0<1>:f r6.4<0;1,0>:f r4.0<8;8,1>:f + send (16|M0) r112:f r10:ub 0x10000002 0x08840001 // SAMPLER wr:4, rd:8, fc: 0x40001 + send (16|M0) null:f r112:ub 0x10000025 0x10031000 {EOT} // DP_RC wr:8, rd:0, Render Target Write msc:16, to #0 + diff --git a/shaders/ps/neg1_gen8.asm b/shaders/ps/neg1_gen8.asm new file mode 100644 index 00000000..582375b5 --- /dev/null +++ b/shaders/ps/neg1_gen8.asm @@ -0,0 +1,9 @@ +mov(8) r112:ud 0x3f800000:ud +mov(8) r113:ud 0x3f800000:ud +mov(8) r114:ud 0x3f800000:ud +mov(8) r115:ud 0x3f800000:ud +mov(8) r116:ud 0x3f800000:ud +mov(8) r117:ud 0x3f800000:ud +mov(8) r118:ud 0x3f800000:ud +mov(8) r119:ud 0x3f800000:ud +send(16) null r112 0x25 0x10031000 { EOT } -- 2.14.4 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders 2018-06-15 9:12 ` [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders Katarzyna Dec @ 2018-06-15 9:19 ` Chris Wilson 2018-06-15 10:15 ` Katarzyna Dec 0 siblings, 1 reply; 12+ messages in thread From: Chris Wilson @ 2018-06-15 9:19 UTC (permalink / raw) To: Katarzyna Dec, igt-dev Quoting Katarzyna Dec (2018-06-15 10:12:59) > We're not planning to work on assembler in igt anymore, since we can > reuse an existing project (IGA) that will do this work for us. The > only extra thing we need to do is convert the result binary to C-array, > simple python script. > > Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> > Cc: Petri Latvala <petri.latvala@intel.com> > Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com> > Cc: Antonio Argenziano <antonio.argenziano@intel.com> > --- > shaders/README | 37 +++++++++++++++++++++++++++++++++++++ > shaders/gpgpu/README | 11 +++++++++++ > shaders/gpgpu/gpgpu_fill_gen8.asm | 10 ++++++++++ > shaders/gpgpu/gpgpu_fill_gen9.asm | 10 ++++++++++ > shaders/media/README | 9 +++++++++ > shaders/media/media_fill_gen8.asm | 11 +++++++++++ > shaders/ps/README | 8 ++++++++ > shaders/ps/blit_gen8.asm | 7 +++++++ > shaders/ps/neg1_gen8.asm | 9 +++++++++ > 9 files changed, 112 insertions(+) > create mode 100644 shaders/README > create mode 100644 shaders/gpgpu/gpgpu_fill_gen8.asm > create mode 100644 shaders/gpgpu/gpgpu_fill_gen9.asm > create mode 100644 shaders/media/media_fill_gen8.asm > create mode 100644 shaders/ps/blit_gen8.asm > create mode 100644 shaders/ps/neg1_gen8.asm > > diff --git a/shaders/README b/shaders/README > new file mode 100644 > index 00000000..9e6bf410 > --- /dev/null > +++ b/shaders/README > @@ -0,0 +1,37 @@ > +This directory is for shaders used in media_fill, gpgpu_fill, rendercopy > +and media_spin libraries. > + > +Till Gen8 shaders were generated using intel-gen4asm script (implementation in > +assembler/ directory). From Gen8 it is possible to use Intel Graphics Assembler > +to generate binary from asm instructions > +https://github.com/intel/intel-graphics-compiler/tree/master/visa/iga > +Clone and build this project to use IGA. > + > +where to find IGA binary TODO: add path > + > +For maintaining compatibility with our tests there is a bin to hex converter > +written in python. > +Instructions how to build media, gpgpu or ps shaders included in their > +subdirectories. > + > +Converter: > +#!/usr/bin/env python2 > +import struct > +import sys > + > +print "static const uint32_t kernel[][4] = {" > + > +with open(sys.argv[1], 'r') as f: > + fmt = '<LLLL' > + step = struct.calcsize(fmt) > + while True: > + buf = f.read(step) > + if not buf: > + break > + elif len(buf) < step: > + buf += '\x00' * (step - len(buf)) > + > + val = struct.unpack('<LLLL', buf) > + print " {{ 0x{:08x}, 0x{:08x}, 0x{:08x}, 0x{:08x} }},".format(*val) > + > +print "};" > \ No newline at end of file How difficult is to make it into a pipe? converter.py < asm.obj > asm.c (As well as converter.py -i asm.obj -o asm.c) Rather than putting this in a README, save the cut'n'paste and include it as a .py. -Chris _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders 2018-06-15 9:19 ` Chris Wilson @ 2018-06-15 10:15 ` Katarzyna Dec 0 siblings, 0 replies; 12+ messages in thread From: Katarzyna Dec @ 2018-06-15 10:15 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev On Fri, Jun 15, 2018 at 10:19:02AM +0100, Chris Wilson wrote: > Quoting Katarzyna Dec (2018-06-15 10:12:59) > > We're not planning to work on assembler in igt anymore, since we can > > reuse an existing project (IGA) that will do this work for us. The > > only extra thing we need to do is convert the result binary to C-array, > > simple python script. > > > > Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> > > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> > > Cc: Petri Latvala <petri.latvala@intel.com> > > Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com> > > Cc: Antonio Argenziano <antonio.argenziano@intel.com> > > --- > > shaders/README | 37 +++++++++++++++++++++++++++++++++++++ > > shaders/gpgpu/README | 11 +++++++++++ > > shaders/gpgpu/gpgpu_fill_gen8.asm | 10 ++++++++++ > > shaders/gpgpu/gpgpu_fill_gen9.asm | 10 ++++++++++ > > shaders/media/README | 9 +++++++++ > > shaders/media/media_fill_gen8.asm | 11 +++++++++++ > > shaders/ps/README | 8 ++++++++ > > shaders/ps/blit_gen8.asm | 7 +++++++ > > shaders/ps/neg1_gen8.asm | 9 +++++++++ > > 9 files changed, 112 insertions(+) > > create mode 100644 shaders/README > > create mode 100644 shaders/gpgpu/gpgpu_fill_gen8.asm > > create mode 100644 shaders/gpgpu/gpgpu_fill_gen9.asm > > create mode 100644 shaders/media/media_fill_gen8.asm > > create mode 100644 shaders/ps/blit_gen8.asm > > create mode 100644 shaders/ps/neg1_gen8.asm > > > > diff --git a/shaders/README b/shaders/README > > new file mode 100644 > > index 00000000..9e6bf410 > > --- /dev/null > > +++ b/shaders/README > > @@ -0,0 +1,37 @@ > > +This directory is for shaders used in media_fill, gpgpu_fill, rendercopy > > +and media_spin libraries. > > + > > +Till Gen8 shaders were generated using intel-gen4asm script (implementation in > > +assembler/ directory). From Gen8 it is possible to use Intel Graphics Assembler > > +to generate binary from asm instructions > > +https://github.com/intel/intel-graphics-compiler/tree/master/visa/iga > > +Clone and build this project to use IGA. > > + > > +where to find IGA binary TODO: add path > > + > > +For maintaining compatibility with our tests there is a bin to hex converter > > +written in python. > > +Instructions how to build media, gpgpu or ps shaders included in their > > +subdirectories. > > + > > +Converter: > > +#!/usr/bin/env python2 > > +import struct > > +import sys > > + > > +print "static const uint32_t kernel[][4] = {" > > + > > +with open(sys.argv[1], 'r') as f: > > + fmt = '<LLLL' > > + step = struct.calcsize(fmt) > > + while True: > > + buf = f.read(step) > > + if not buf: > > + break > > + elif len(buf) < step: > > + buf += '\x00' * (step - len(buf)) > > + > > + val = struct.unpack('<LLLL', buf) > > + print " {{ 0x{:08x}, 0x{:08x}, 0x{:08x}, 0x{:08x} }},".format(*val) > > + > > +print "};" > > \ No newline at end of file > > How difficult is to make it into a pipe? converter.py < asm.obj > asm.c > (As well as converter.py -i asm.obj -o asm.c) > > Rather than putting this in a README, save the cut'n'paste and include > it as a .py. > -Chris I will add this converter as single file. Kasia _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t v2 2/2] lib/i915: Move shaders directory 2018-06-15 9:12 [igt-dev] [PATCH i-g-t v2 0/2] Shaders documentation Katarzyna Dec 2018-06-15 9:12 ` [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders Katarzyna Dec @ 2018-06-15 9:13 ` Katarzyna Dec 2018-06-15 9:20 ` Chris Wilson 2018-06-15 10:39 ` [igt-dev] ✓ Fi.CI.BAT: success for Shaders documentation (rev2) Patchwork 2018-06-15 18:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 3 siblings, 1 reply; 12+ messages in thread From: Katarzyna Dec @ 2018-06-15 9:13 UTC (permalink / raw) To: igt-dev In shaders/ directory we got Intel specific information. As igt is a project for more vendors, let's move this directory to lib/i915. Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> --- {shaders => lib/i915/shaders}/README | 0 {shaders => lib/i915/shaders}/gpgpu/README | 0 {shaders => lib/i915/shaders}/gpgpu/gpgpu_fill.gxa | 0 {shaders => lib/i915/shaders}/gpgpu/gpgpu_fill_gen8.asm | 0 {shaders => lib/i915/shaders}/gpgpu/gpgpu_fill_gen9.asm | 0 {shaders => lib/i915/shaders}/media/README | 0 {shaders => lib/i915/shaders}/media/media_fill.gxa | 0 {shaders => lib/i915/shaders}/media/media_fill_gen8.asm | 0 {shaders => lib/i915/shaders}/ps/README | 0 {shaders => lib/i915/shaders}/ps/blit.g7a | 0 {shaders => lib/i915/shaders}/ps/blit_gen8.asm | 0 {shaders => lib/i915/shaders}/ps/neg1_gen8.asm | 0 {shaders => lib/i915/shaders}/ps/neg1_test.g7a | 0 13 files changed, 0 insertions(+), 0 deletions(-) rename {shaders => lib/i915/shaders}/README (100%) rename {shaders => lib/i915/shaders}/gpgpu/README (100%) rename {shaders => lib/i915/shaders}/gpgpu/gpgpu_fill.gxa (100%) rename {shaders => lib/i915/shaders}/gpgpu/gpgpu_fill_gen8.asm (100%) rename {shaders => lib/i915/shaders}/gpgpu/gpgpu_fill_gen9.asm (100%) rename {shaders => lib/i915/shaders}/media/README (100%) rename {shaders => lib/i915/shaders}/media/media_fill.gxa (100%) rename {shaders => lib/i915/shaders}/media/media_fill_gen8.asm (100%) rename {shaders => lib/i915/shaders}/ps/README (100%) rename {shaders => lib/i915/shaders}/ps/blit.g7a (100%) rename {shaders => lib/i915/shaders}/ps/blit_gen8.asm (100%) rename {shaders => lib/i915/shaders}/ps/neg1_gen8.asm (100%) rename {shaders => lib/i915/shaders}/ps/neg1_test.g7a (100%) diff --git a/shaders/README b/lib/i915/shaders/README similarity index 100% rename from shaders/README rename to lib/i915/shaders/README diff --git a/shaders/gpgpu/README b/lib/i915/shaders/gpgpu/README similarity index 100% rename from shaders/gpgpu/README rename to lib/i915/shaders/gpgpu/README diff --git a/shaders/gpgpu/gpgpu_fill.gxa b/lib/i915/shaders/gpgpu/gpgpu_fill.gxa similarity index 100% rename from shaders/gpgpu/gpgpu_fill.gxa rename to lib/i915/shaders/gpgpu/gpgpu_fill.gxa diff --git a/shaders/gpgpu/gpgpu_fill_gen8.asm b/lib/i915/shaders/gpgpu/gpgpu_fill_gen8.asm similarity index 100% rename from shaders/gpgpu/gpgpu_fill_gen8.asm rename to lib/i915/shaders/gpgpu/gpgpu_fill_gen8.asm diff --git a/shaders/gpgpu/gpgpu_fill_gen9.asm b/lib/i915/shaders/gpgpu/gpgpu_fill_gen9.asm similarity index 100% rename from shaders/gpgpu/gpgpu_fill_gen9.asm rename to lib/i915/shaders/gpgpu/gpgpu_fill_gen9.asm diff --git a/shaders/media/README b/lib/i915/shaders/media/README similarity index 100% rename from shaders/media/README rename to lib/i915/shaders/media/README diff --git a/shaders/media/media_fill.gxa b/lib/i915/shaders/media/media_fill.gxa similarity index 100% rename from shaders/media/media_fill.gxa rename to lib/i915/shaders/media/media_fill.gxa diff --git a/shaders/media/media_fill_gen8.asm b/lib/i915/shaders/media/media_fill_gen8.asm similarity index 100% rename from shaders/media/media_fill_gen8.asm rename to lib/i915/shaders/media/media_fill_gen8.asm diff --git a/shaders/ps/README b/lib/i915/shaders/ps/README similarity index 100% rename from shaders/ps/README rename to lib/i915/shaders/ps/README diff --git a/shaders/ps/blit.g7a b/lib/i915/shaders/ps/blit.g7a similarity index 100% rename from shaders/ps/blit.g7a rename to lib/i915/shaders/ps/blit.g7a diff --git a/shaders/ps/blit_gen8.asm b/lib/i915/shaders/ps/blit_gen8.asm similarity index 100% rename from shaders/ps/blit_gen8.asm rename to lib/i915/shaders/ps/blit_gen8.asm diff --git a/shaders/ps/neg1_gen8.asm b/lib/i915/shaders/ps/neg1_gen8.asm similarity index 100% rename from shaders/ps/neg1_gen8.asm rename to lib/i915/shaders/ps/neg1_gen8.asm diff --git a/shaders/ps/neg1_test.g7a b/lib/i915/shaders/ps/neg1_test.g7a similarity index 100% rename from shaders/ps/neg1_test.g7a rename to lib/i915/shaders/ps/neg1_test.g7a -- 2.14.4 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2 2/2] lib/i915: Move shaders directory 2018-06-15 9:13 ` [igt-dev] [PATCH i-g-t v2 2/2] lib/i915: Move shaders directory Katarzyna Dec @ 2018-06-15 9:20 ` Chris Wilson 2018-06-15 10:12 ` Katarzyna Dec 0 siblings, 1 reply; 12+ messages in thread From: Chris Wilson @ 2018-06-15 9:20 UTC (permalink / raw) To: Katarzyna Dec, igt-dev Quoting Katarzyna Dec (2018-06-15 10:13:00) > In shaders/ directory we got Intel specific information. As igt > is a project for more vendors, let's move this directory to > lib/i915. > > Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> > Cc: Petri Latvala <petri.latvala@intel.com> > Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com> > Cc: Antonio Argenziano <antonio.argenziano@intel.com> Hmm, should there be Makefile fragments updates? I take it we never included these in any tarball? -Chris _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2 2/2] lib/i915: Move shaders directory 2018-06-15 9:20 ` Chris Wilson @ 2018-06-15 10:12 ` Katarzyna Dec 2018-06-15 10:15 ` Chris Wilson 0 siblings, 1 reply; 12+ messages in thread From: Katarzyna Dec @ 2018-06-15 10:12 UTC (permalink / raw) To: Chris Wilson; +Cc: igt-dev On Fri, Jun 15, 2018 at 10:20:06AM +0100, Chris Wilson wrote: > Quoting Katarzyna Dec (2018-06-15 10:13:00) > > In shaders/ directory we got Intel specific information. As igt > > is a project for more vendors, let's move this directory to > > lib/i915. > > > > Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> > > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> > > Cc: Petri Latvala <petri.latvala@intel.com> > > Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com> > > Cc: Antonio Argenziano <antonio.argenziano@intel.com> > > Hmm, should there be Makefile fragments updates? I take it we never > included these in any tarball? > -Chris There were no makefiles previously, it looks like shaders/ were never build. Should I add makefiles there? Kasia _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2 2/2] lib/i915: Move shaders directory 2018-06-15 10:12 ` Katarzyna Dec @ 2018-06-15 10:15 ` Chris Wilson 0 siblings, 0 replies; 12+ messages in thread From: Chris Wilson @ 2018-06-15 10:15 UTC (permalink / raw) To: Katarzyna Dec; +Cc: igt-dev Quoting Katarzyna Dec (2018-06-15 11:12:51) > On Fri, Jun 15, 2018 at 10:20:06AM +0100, Chris Wilson wrote: > > Quoting Katarzyna Dec (2018-06-15 10:13:00) > > > In shaders/ directory we got Intel specific information. As igt > > > is a project for more vendors, let's move this directory to > > > lib/i915. > > > > > > Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> > > > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> > > > Cc: Petri Latvala <petri.latvala@intel.com> > > > Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com> > > > Cc: Antonio Argenziano <antonio.argenziano@intel.com> > > > > Hmm, should there be Makefile fragments updates? I take it we never > > included these in any tarball? > > -Chris > > There were no makefiles previously, it looks like shaders/ were never build. > Should I add makefiles there? Nah, if they aren't actually there atm no need to fix it right now. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for Shaders documentation (rev2) 2018-06-15 9:12 [igt-dev] [PATCH i-g-t v2 0/2] Shaders documentation Katarzyna Dec 2018-06-15 9:12 ` [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders Katarzyna Dec 2018-06-15 9:13 ` [igt-dev] [PATCH i-g-t v2 2/2] lib/i915: Move shaders directory Katarzyna Dec @ 2018-06-15 10:39 ` Patchwork 2018-06-15 18:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 3 siblings, 0 replies; 12+ messages in thread From: Patchwork @ 2018-06-15 10:39 UTC (permalink / raw) To: Katarzyna Dec; +Cc: igt-dev == Series Details == Series: Shaders documentation (rev2) URL : https://patchwork.freedesktop.org/series/44758/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4314 -> IGTPW_1463 = == Summary - SUCCESS == No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/44758/revisions/2/mbox/ == Known issues == Here are the changes found in IGTPW_1463 that come from known issues: === IGT changes === ==== Issues hit ==== igt@drv_module_reload@basic-reload: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106248, fdo#106725) ==== Possible fixes ==== igt@debugfs_test@read_all_entries: fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS igt@gem_exec_suspend@basic-s4-devices: fi-kbl-7500u: DMESG-WARN (fdo#105128) -> PASS igt@kms_flip@basic-flip-vs-wf_vblank: fi-cnl-psr: FAIL (fdo#100368) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713 fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128 fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248 fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725 == Participating hosts (44 -> 37) == Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-cnl-y3 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 == Build changes == * IGT: IGT_4518 -> IGTPW_1463 CI_DRM_4314: 2f4a101babe898ba750fa274dc90db1ede57d59c @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_1463: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1463/ IGT_4518: e4908004547b63131352fbc0ddcdb1d3d55480e0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1463/issues.html _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for Shaders documentation (rev2) 2018-06-15 9:12 [igt-dev] [PATCH i-g-t v2 0/2] Shaders documentation Katarzyna Dec ` (2 preceding siblings ...) 2018-06-15 10:39 ` [igt-dev] ✓ Fi.CI.BAT: success for Shaders documentation (rev2) Patchwork @ 2018-06-15 18:12 ` Patchwork 3 siblings, 0 replies; 12+ messages in thread From: Patchwork @ 2018-06-15 18:12 UTC (permalink / raw) To: Katarzyna Dec; +Cc: igt-dev == Series Details == Series: Shaders documentation (rev2) URL : https://patchwork.freedesktop.org/series/44758/ State : success == Summary == = CI Bug Log - changes from IGT_4518_full -> IGTPW_1463_full = == Summary - WARNING == Minor unknown changes coming with IGTPW_1463_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in IGTPW_1463_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44758/revisions/2/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in IGTPW_1463_full: === IGT changes === ==== Warnings ==== igt@gem_mocs_settings@mocs-rc6-dirty-render: shard-kbl: PASS -> SKIP igt@gem_mocs_settings@mocs-rc6-vebox: shard-kbl: SKIP -> PASS +2 igt@pm_rc6_residency@rc6-accuracy: shard-snb: PASS -> SKIP == Known issues == Here are the changes found in IGTPW_1463_full that come from known issues: === IGT changes === ==== Issues hit ==== igt@drv_selftest@live_hangcheck: shard-kbl: PASS -> DMESG-FAIL (fdo#106560) shard-apl: PASS -> DMESG-FAIL (fdo#106560) igt@kms_available_modes_crc@available_mode_test_crc: shard-snb: PASS -> FAIL (fdo#106641) igt@kms_flip@wf_vblank-ts-check: shard-hsw: PASS -> FAIL (fdo#100368) igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-render: shard-snb: PASS -> FAIL (fdo#104724, fdo#103167) igt@kms_setmode@basic: shard-hsw: PASS -> FAIL (fdo#99912) ==== Possible fixes ==== igt@gem_wait@await-bsd2: shard-snb: INCOMPLETE (fdo#105411) -> SKIP igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing: shard-glk: FAIL (fdo#105703) -> PASS +1 igt@kms_flip@2x-plain-flip-fb-recreate-interruptible: shard-glk: FAIL (fdo#100368) -> PASS +1 igt@kms_flip@2x-plain-flip-ts-check: shard-hsw: FAIL (fdo#100368) -> PASS igt@kms_rotation_crc@sprite-rotation-180: shard-hsw: FAIL (fdo#103925, fdo#104724) -> PASS igt@kms_setmode@basic: shard-apl: FAIL (fdo#99912) -> PASS ==== Warnings ==== igt@drv_selftest@live_gtt: shard-glk: INCOMPLETE (fdo#103359, k.org#198133) -> FAIL (fdo#105347) fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167 fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359 fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347 fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411 fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703 fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560 fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * IGT: IGT_4518 -> IGTPW_1463 * Linux: CI_DRM_4309 -> CI_DRM_4314 CI_DRM_4309: 2740c5b0d0f40092355b329a62ede8cced7f64b9 @ git://anongit.freedesktop.org/gfx-ci/linux CI_DRM_4314: 2f4a101babe898ba750fa274dc90db1ede57d59c @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_1463: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1463/ IGT_4518: e4908004547b63131352fbc0ddcdb1d3d55480e0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1463/shards.html _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t v2 0/2] Shaders documentation RESENDING
@ 2018-10-03 13:48 Katarzyna Dec
2018-10-03 13:48 ` [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders Katarzyna Dec
0 siblings, 1 reply; 12+ messages in thread
From: Katarzyna Dec @ 2018-10-03 13:48 UTC (permalink / raw)
To: igt-dev
This is the same series that was sent in june'18, but got lost during review.
Major issue was with introducing IGA for newer gens.
I've discussed about this series lately on intel-gfx and with high probability
we could merge it (after successful review).
Please look at these patches and leave your comment.
v2: I have applied comments from review - fixed typos, changed readme files,
updated converter and updated comments like "see shader/ps" in libs to new
path.
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Katarzyna Dec (2):
shaders: Add assembler instructions and update README for shaders
lib/i915: Move shaders directory
lib/gpgpu_fill.c | 2 +-
lib/i915/shaders/README | 25 ++++++++++++++++++
lib/i915/shaders/converter.py | 26 +++++++++++++++++++
.../i915/shaders}/gpgpu/gpgpu_fill.gxa | 0
lib/i915/shaders/gpgpu/gpgpu_fill_gen8.asm | 10 +++++++
lib/i915/shaders/gpgpu/gpgpu_fill_gen9.asm | 10 +++++++
.../i915/shaders}/media/media_fill.gxa | 0
lib/i915/shaders/media/media_fill_gen8.asm | 11 ++++++++
{shaders => lib/i915/shaders}/ps/blit.g7a | 0
lib/i915/shaders/ps/blit_gen8.asm | 7 +++++
lib/i915/shaders/ps/neg1_gen8.asm | 9 +++++++
.../i915/shaders}/ps/neg1_test.g7a | 0
lib/rendercopy_gen8.c | 2 +-
lib/rendercopy_gen9.c | 2 +-
shaders/gpgpu/README | 4 ---
shaders/media/README | 5 ----
shaders/ps/README | 1 -
17 files changed, 101 insertions(+), 13 deletions(-)
create mode 100644 lib/i915/shaders/README
create mode 100644 lib/i915/shaders/converter.py
rename {shaders => lib/i915/shaders}/gpgpu/gpgpu_fill.gxa (100%)
create mode 100644 lib/i915/shaders/gpgpu/gpgpu_fill_gen8.asm
create mode 100644 lib/i915/shaders/gpgpu/gpgpu_fill_gen9.asm
rename {shaders => lib/i915/shaders}/media/media_fill.gxa (100%)
create mode 100644 lib/i915/shaders/media/media_fill_gen8.asm
rename {shaders => lib/i915/shaders}/ps/blit.g7a (100%)
create mode 100644 lib/i915/shaders/ps/blit_gen8.asm
create mode 100644 lib/i915/shaders/ps/neg1_gen8.asm
rename {shaders => lib/i915/shaders}/ps/neg1_test.g7a (100%)
delete mode 100644 shaders/gpgpu/README
delete mode 100644 shaders/media/README
delete mode 100644 shaders/ps/README
--
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 12+ messages in thread* [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders 2018-10-03 13:48 [igt-dev] [PATCH i-g-t v2 0/2] Shaders documentation RESENDING Katarzyna Dec @ 2018-10-03 13:48 ` Katarzyna Dec 2018-10-04 7:53 ` Arkadiusz Hiler 0 siblings, 1 reply; 12+ messages in thread From: Katarzyna Dec @ 2018-10-03 13:48 UTC (permalink / raw) To: igt-dev We're not planning to work on assembler in igt anymore, since we can reuse an existing project (IGA) that will do this work for us. The only extra thing we need to do is convert the result binary to C-array, simple python script. v2: Moved converter to single file. Fixed README for shaders. v3: Fixed typos. v4: Used python3 in converter. Added 'usage' section to script. Droped readme files for particular shaders and consolidated all needed information in one general file. Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> --- shaders/README | 25 +++++++++++++++++++++++++ shaders/converter.py | 26 ++++++++++++++++++++++++++ shaders/gpgpu/README | 4 ---- shaders/gpgpu/gpgpu_fill_gen8.asm | 10 ++++++++++ shaders/gpgpu/gpgpu_fill_gen9.asm | 10 ++++++++++ shaders/media/README | 5 ----- shaders/media/media_fill_gen8.asm | 11 +++++++++++ shaders/ps/README | 1 - shaders/ps/blit_gen8.asm | 7 +++++++ shaders/ps/neg1_gen8.asm | 9 +++++++++ 10 files changed, 98 insertions(+), 10 deletions(-) create mode 100644 shaders/README create mode 100644 shaders/converter.py delete mode 100644 shaders/gpgpu/README create mode 100644 shaders/gpgpu/gpgpu_fill_gen8.asm create mode 100644 shaders/gpgpu/gpgpu_fill_gen9.asm delete mode 100644 shaders/media/README create mode 100644 shaders/media/media_fill_gen8.asm delete mode 100644 shaders/ps/README create mode 100644 shaders/ps/blit_gen8.asm create mode 100644 shaders/ps/neg1_gen8.asm diff --git a/shaders/README b/shaders/README new file mode 100644 index 00000000..06b9883c --- /dev/null +++ b/shaders/README @@ -0,0 +1,25 @@ +This directory is for shaders used in media_fill, gpgpu_fill, rendercopy +and media_spin libraries. + +Till Gen8 shaders were generated using intel-gen4asm script (implementation in +assembler/ directory). From Gen8 it is possible to use Intel Graphics Assembler +to generate binary from asm instructions. +https://github.com/intel/intel-graphics-compiler + 1. Clone IGC project + 2. Go to igc/visa/iga + 3. Build iga + cmake . && make + +For maintaining compatibility with our tests there is a bin to hex converter +written in python: + $>converter.py input_file > output_file +e.g.$>python converter.py gen9_iga_output > gen9_hex_array + +Commands used to generate the shader on gen7 +$> m4 gpgpu_fill.gxa > gpgpu_fill.gxm +$> intel-gen4asm -g 7 -o <output> gpgpu_fill.gxm + +Commands used to generate the shader on gen8 +$> m4 media_fill.gxa > media_fill.gxm +$> intel-gen4asm -g 8 -o <output> media_fill.gxm + diff --git a/shaders/converter.py b/shaders/converter.py new file mode 100644 index 00000000..25a79a94 --- /dev/null +++ b/shaders/converter.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +import struct +import sys +import argparse + +parser=argparse.ArgumentParser( + description='''Script for converting shaders from binary to hex ''' ) +parser = argparse.ArgumentParser(prog='converter.py', usage='%(prog)s binary_file') +parser.add_argument('binary', nargs=1, help='binary_file') +args=parser.parse_args() + +print "static const uint32_t kernel[][4] = {" +with open(sys.argv[1], 'r') as f: + fmt = '<LLLL' + step = struct.calcsize(fmt) + while True: + buf = f.read(step) + if not buf: + break + elif len(buf) < step: + buf += '\x00' * (step - len(buf)) + + val = struct.unpack('<LLLL', buf) + print "\t{{ 0x{:08x}, 0x{:08x}, 0x{:08x}, 0x{:08x} }},".format(*val) + +print "};" diff --git a/shaders/gpgpu/README b/shaders/gpgpu/README deleted file mode 100644 index 3bf328ad..00000000 --- a/shaders/gpgpu/README +++ /dev/null @@ -1,4 +0,0 @@ - -Commands used to generate the shader on gen7 -$> m4 gpgpu_fill.gxa > gpgpu_fill.gxm -$> intel-gen4asm -g 7 -o <output> gpgpu_fill.gxm diff --git a/shaders/gpgpu/gpgpu_fill_gen8.asm b/shaders/gpgpu/gpgpu_fill_gen8.asm new file mode 100644 index 00000000..448e0256 --- /dev/null +++ b/shaders/gpgpu/gpgpu_fill_gen8.asm @@ -0,0 +1,10 @@ + mov (4|M0) r1.0<1>:ub r1.0<0;1,0>:ub + mul (1|M0) r2.0<1>:ud r0.1<0;1,0>:ud 0x10:ud + mov (1|M0) r2.1<1>:ud r0.6<0;1,0>:ud + mov (8|M0) r4.0<1>:ud r0.0<8;8,1>:ud + mov (2|M0) r4.0<1>:ud r2.0<2;2,1>:ud + mov (1|M0) r4.2<1>:ud 0xF:ud + mov (16|M0) (eq)f0.0 r5.0<1>:ud r1.0<0;1,0>:ud + send (16|M0) acc0.0:uw r4:d 0xC 0x060A8000 // DP_DC1 wr:3h, rd:0, fc: 0x28000 + mov (8|M0) r112.0<1>:ud r0.0<8;8,1>:ud + send (16|M0) null:uw r112:d 0x27 0x02000010 {EOT} // SPAWNER wr:1, rd:0, fc: 0x10 diff --git a/shaders/gpgpu/gpgpu_fill_gen9.asm b/shaders/gpgpu/gpgpu_fill_gen9.asm new file mode 100644 index 00000000..6f948935 --- /dev/null +++ b/shaders/gpgpu/gpgpu_fill_gen9.asm @@ -0,0 +1,10 @@ + mov (4|M0) r1.0<1>:ub r1.0<0;1,0>:ub + mul (1|M0) r2.0<1>:ud r0.1<0;1,0>:ud 0x10:ud + mov (1|M0) r2.1<1>:ud r0.6<0;1,0>:ud + mov (8|M0) r4.0<1>:ud r0.0<8;8,1>:ud + mov (2|M0) r4.0<1>:ud r2.0<2;2,1>:ud + mov (1|M0) r4.2<1>:ud 0xF:ud + mov (16|M0) r5.0<1>:ud r1.0<0;1,0>:ud + send (16|M0) acc0.0:uw r4:d 0xC 0x060A8000 // DP_DC1 wr:3h, rd:0, fc: 0x28000 + mov (8|M0) r112.0<1>:ud r0.0<8;8,1>:ud + send (16|M0) null:uw r112:d 0x27 0x02000010 {EOT} // SPAWNER wr:1, rd:0, fc: 0x10 diff --git a/shaders/media/README b/shaders/media/README deleted file mode 100644 index 9f296010..00000000 --- a/shaders/media/README +++ /dev/null @@ -1,5 +0,0 @@ -These files are here for reference only. - -Commands used to generate the shader on gen8 -$> m4 media_fill.gxa > media_fill.gxm -$> intel-gen4asm -g 8 -o <output> media_fill.gxm diff --git a/shaders/media/media_fill_gen8.asm b/shaders/media/media_fill_gen8.asm new file mode 100644 index 00000000..4b6eb84b --- /dev/null +++ b/shaders/media/media_fill_gen8.asm @@ -0,0 +1,11 @@ + mov (4|M0) r1.0<1>:ub r1.0<0;1,0>:ub + mov (8|M0) r4.0<1>:ud r0.0<8;8,1>:ud + mov (2|M0) r4.0<1>:ud r2.0<2;2,1>:ud + mov (1|M0) r4.2<1>:ud 0xF000F:ud + mov (16|M0) r5.0<1>:ud r1.0<0;1,0>:ud + mov (16|M0) r7.0<1>:ud r1.0<0;1,0>:ud + mov (16|M0) r9.0<1>:ud r1.0<0;1,0>:ud + mov (16|M0) r11.0<1>:ud r1.0<0;1,0>:ud + send (16|M0) acc0.0:uw r4:d 0x1000000C 0x120A8000 // DP_DC1 wr:9h, rd:0, fc: 0x28000 + mov (8|M0) r112.0<1>:ud r0.0<8;8,1>:ud + send (16|M0) null:uw r112:d 0x10000027 0x02000010 {EOT} // SPAWNER wr:1, rd:0, fc: 0x10 diff --git a/shaders/ps/README b/shaders/ps/README deleted file mode 100644 index b196d025..00000000 --- a/shaders/ps/README +++ /dev/null @@ -1 +0,0 @@ -These files are here for reference only. diff --git a/shaders/ps/blit_gen8.asm b/shaders/ps/blit_gen8.asm new file mode 100644 index 00000000..c35b70a1 --- /dev/null +++ b/shaders/ps/blit_gen8.asm @@ -0,0 +1,7 @@ + pln (8|M0) r10.0<1>:f r6.0<0;1,0>:f r2.0<8;8,1>:f + pln (8|M0) r11.0<1>:f r6.0<0;1,0>:f r4.0<8;8,1>:f + pln (8|M0) r12.0<1>:f r6.4<0;1,0>:f r2.0<8;8,1>:f + pln (8|M0) 13.0<1>:f r6.4<0;1,0>:f r4.0<8;8,1>:f + send (16|M0) r112:f r10:ub 0x10000002 0x08840001 // SAMPLER wr:4, rd:8, fc: 0x40001 + send (16|M0) null:f r112:ub 0x10000025 0x10031000 {EOT} // DP_RC wr:8, rd:0, Render Target Write msc:16, to #0 + diff --git a/shaders/ps/neg1_gen8.asm b/shaders/ps/neg1_gen8.asm new file mode 100644 index 00000000..582375b5 --- /dev/null +++ b/shaders/ps/neg1_gen8.asm @@ -0,0 +1,9 @@ +mov(8) r112:ud 0x3f800000:ud +mov(8) r113:ud 0x3f800000:ud +mov(8) r114:ud 0x3f800000:ud +mov(8) r115:ud 0x3f800000:ud +mov(8) r116:ud 0x3f800000:ud +mov(8) r117:ud 0x3f800000:ud +mov(8) r118:ud 0x3f800000:ud +mov(8) r119:ud 0x3f800000:ud +send(16) null r112 0x25 0x10031000 { EOT } -- 2.17.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders 2018-10-03 13:48 ` [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders Katarzyna Dec @ 2018-10-04 7:53 ` Arkadiusz Hiler 0 siblings, 0 replies; 12+ messages in thread From: Arkadiusz Hiler @ 2018-10-04 7:53 UTC (permalink / raw) To: Katarzyna Dec; +Cc: igt-dev On Wed, Oct 03, 2018 at 03:48:39PM +0200, Katarzyna Dec wrote: > We're not planning to work on assembler in igt anymore, since we can > reuse an existing project (IGA) that will do this work for us. The > only extra thing we need to do is convert the result binary to C-array, > simple python script. > > v2: Moved converter to single file. Fixed README for shaders. > v3: Fixed typos. > v4: Used python3 in converter. Added 'usage' section to script. Droped > readme files for particular shaders and consolidated all needed > information in one general file. > > Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> > Cc: Petri Latvala <petri.latvala@intel.com> > Cc: Kalamarz Lukasz <lukasz.kalamarz@intel.com> > Cc: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> and merged, thanks! _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-10-04 7:53 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-06-15 9:12 [igt-dev] [PATCH i-g-t v2 0/2] Shaders documentation Katarzyna Dec 2018-06-15 9:12 ` [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders Katarzyna Dec 2018-06-15 9:19 ` Chris Wilson 2018-06-15 10:15 ` Katarzyna Dec 2018-06-15 9:13 ` [igt-dev] [PATCH i-g-t v2 2/2] lib/i915: Move shaders directory Katarzyna Dec 2018-06-15 9:20 ` Chris Wilson 2018-06-15 10:12 ` Katarzyna Dec 2018-06-15 10:15 ` Chris Wilson 2018-06-15 10:39 ` [igt-dev] ✓ Fi.CI.BAT: success for Shaders documentation (rev2) Patchwork 2018-06-15 18:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2018-10-03 13:48 [igt-dev] [PATCH i-g-t v2 0/2] Shaders documentation RESENDING Katarzyna Dec 2018-10-03 13:48 ` [igt-dev] [PATCH i-g-t v2 1/2] shaders: Add assembler instructions and update README for shaders Katarzyna Dec 2018-10-04 7:53 ` Arkadiusz Hiler
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox