Re: [Mesa-dev] [PATCH (gles3) 00/20] i965: Implement GLSL ES 3.00 pack/unpack functions (v2)
On 01/21/2013 03:49 AM, Chad Versace wrote: This series lives on my gles3-glsl-packing branch. The series is Reviewed-by: Ian Romanick Hopefully Eric, Ken, or Paul can comment about the i965 back-end bits. We should also expose the GL_ARB_shading_language_packing. It's the same set of functions, but it's desktop GL instead of ES. That should be a follow up patch... we want to get these patches in as soon as reasonably possible. I tested this series against my piglit gles3-glsl-packing branch on Ivybridge and Sandybridge. No regressions relative to the Mesa gles3-d72ba278e. v2: - Do all of idr's minor fixes. - Improve the rounding bias in _mesa_float_to_half. - For evaluating constant pack/unpackHalf2x16 expressions, use _mesa_float_to_half/_mesa_half_to_float [for idr]. - Add a bunch of new stuff to ir_builder. - Rewrite the lowering pass using ir_builder [for idr]. - In lowering packHalf2x16, don't truncate subnormal float16 values to zero. And round to even rather than to zero. [for stereotype441] Chad Versace (20): glsl: Fix typo in comment glsl: Add IR lisp for GLSL ES 3.00 pack/unpack functions glsl: Extend ir_expression_operation for GLSL 3.00 pack/unpack functions (v2) glsl/standalone_scaffolding: Add stub for _mesa_warning() mesa,glsl: Move round_to_even() from glsl to mesa/main mesa: Remove rounding bias in _mesa_float_to_half() glsl: Evaluate constant GLSL ES 3.00 pack/unpack expressions (v2) glsl/ir_factory: Initialize members to NULL in constructor glsl/ir_builder: Add more helpers for constructing expressions glsl/ir_factory: Add helper method for making an ir_constant glsl/ir_builder: Add `enum writemask` glsl/ir_builder: Add helpers for making if-statements glsl: Reformat and/or/xor cases in ir_expression ctor glsl: Fix type-deduction for and/or/xor expressions glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2) i965: Lower the GLSL ES 3.00 pack/unpack operations (v2) i965: Add opcodes for F32TO16 and F16TO32 i965: Quote the PRM on a HorzStride subtlety i965/vs/gen7: Emit code for GLSL ES 3.00 pack/unpack operations i965/fs/gen7: Emit code for GLSL 3.00 pack/unpack operations (v2) src/glsl/Makefile.am |2 + src/glsl/Makefile.sources |1 + src/glsl/builtin_compiler/Makefile.am |1 + src/glsl/builtins/ir/packHalf2x16.ir |6 + src/glsl/builtins/ir/packSnorm2x16.ir |6 + src/glsl/builtins/ir/packUnorm2x16.ir |6 + src/glsl/builtins/ir/unpackHalf2x16.ir |6 + src/glsl/builtins/ir/unpackSnorm2x16.ir|6 + src/glsl/builtins/ir/unpackUnorm2x16.ir|6 + src/glsl/builtins/profiles/300es.glsl | 14 +- src/glsl/ir.cpp| 36 +- src/glsl/ir.h | 33 +- src/glsl/ir_builder.cpp| 159 +++ src/glsl/ir_builder.h | 72 ++ src/glsl/ir_constant_expression.cpp| 208 +++- src/glsl/ir_optimization.h | 20 + src/glsl/ir_validate.cpp | 26 + src/glsl/lower_packing_builtins.cpp| 1043 src/glsl/standalone_scaffolding.cpp| 18 + src/glsl/standalone_scaffolding.h |3 + src/mesa/drivers/dri/i965/brw_defines.h|3 + src/mesa/drivers/dri/i965/brw_disasm.c |2 + src/mesa/drivers/dri/i965/brw_eu.h |2 + src/mesa/drivers/dri/i965/brw_eu_emit.c|7 +- src/mesa/drivers/dri/i965/brw_fs.h |7 + .../dri/i965/brw_fs_channel_expressions.cpp| 12 + src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 39 +- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 82 +- src/mesa/drivers/dri/i965/brw_shader.cpp | 32 + src/mesa/drivers/dri/i965/brw_vec4.h |3 + src/mesa/drivers/dri/i965/brw_vec4_emit.cpp|8 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 155 +++ src/mesa/main/imports.c| 86 +- src/mesa/main/imports.h|3 + src/mesa/program/ir_to_mesa.cpp| 12 +- 35 files changed, 2061 insertions(+), 64 deletions(-) create mode 100644 src/glsl/builtins/ir/packHalf2x16.ir create mode 100644 src/glsl/builtins/ir/packSnorm2x16.ir create mode 100644 src/glsl/builtins/ir/packUnorm2x16.ir create mode 100644 src/glsl/builtins/ir/unpackHalf2x16.ir create mode 100644 src/glsl/builtins/ir/unpackSnorm2x16.ir create mode 100644 src/glsl/builtins/ir/unpackUnorm2x16.ir create mode 100644 src/glsl/lower_packing_builtins.cpp ___ mesa-dev
Re: [Mesa-dev] [PATCH (gles3) 00/20] i965: Implement GLSL ES 3.00 pack/unpack functions (v2)
On Mon, Jan 21, 2013 at 10:56 AM, Ian Romanick wrote: > We should also expose the GL_ARB_shading_language_packing. It's the same > set of functions, but it's desktop GL instead of ES. That should be a > follow up patch... we want to get these patches in as soon as reasonably > possible. The ARB_shading_language_packing extension actually adds some 4x8 functions, like packUnorm4x8, that aren't in ES 3. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH (gles3) 00/20] i965: Implement GLSL ES 3.00 pack/unpack functions (v2)
On 01/21/2013 02:13 PM, Matt Turner wrote: On Mon, Jan 21, 2013 at 10:56 AM, Ian Romanick wrote: We should also expose the GL_ARB_shading_language_packing. It's the same set of functions, but it's desktop GL instead of ES. That should be a follow up patch... we want to get these patches in as soon as reasonably possible. The ARB_shading_language_packing extension actually adds some 4x8 functions, like packUnorm4x8, that aren't in ES 3. Ah, that's right. It's a bit of a shame that GL_ARB_shading_language_packing won't make this release, then. :( ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH (gles3) 00/20] i965: Implement GLSL ES 3.00 pack/unpack functions (v2)
On Mon, Jan 21, 2013 at 11:47 AM, Ian Romanick wrote: > On 01/21/2013 02:13 PM, Matt Turner wrote: >> >> On Mon, Jan 21, 2013 at 10:56 AM, Ian Romanick >> wrote: >>> >>> We should also expose the GL_ARB_shading_language_packing. It's the same >>> set of functions, but it's desktop GL instead of ES. That should be a >>> follow up patch... we want to get these patches in as soon as reasonably >>> possible. >> >> >> The ARB_shading_language_packing extension actually adds some 4x8 >> functions, like packUnorm4x8, that aren't in ES 3. > > > Ah, that's right. It's a bit of a shame that > GL_ARB_shading_language_packing won't make this release, then. :( I worked out an untested implementation of the other four pack/unpack operations here: http://cgit.freedesktop.org/~mattst88/mesa/log/?h=gles3-glsl-packing I'll add testing support to Chad's piglit test. I don't see why it can't make this release. :) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH (gles3) 00/20] i965: Implement GLSL ES 3.00 pack/unpack functions (v2)
On Mon, Jan 21, 2013 at 12:49 AM, Chad Versace wrote: > This series lives on my gles3-glsl-packing branch. > > I tested this series against my piglit gles3-glsl-packing branch on Ivybridge > and Sandybridge. No regressions relative to the Mesa gles3-d72ba278e. > > v2: > - Do all of idr's minor fixes. > - Improve the rounding bias in _mesa_float_to_half. > - For evaluating constant pack/unpackHalf2x16 expressions, use > _mesa_float_to_half/_mesa_half_to_float [for idr]. > - Add a bunch of new stuff to ir_builder. > - Rewrite the lowering pass using ir_builder [for idr]. > - In lowering packHalf2x16, don't truncate subnormal float16 values to zero. > And round to even rather than to zero. [for stereotype441] > > > Chad Versace (20): > glsl: Fix typo in comment > glsl: Add IR lisp for GLSL ES 3.00 pack/unpack functions > glsl: Extend ir_expression_operation for GLSL 3.00 pack/unpack > functions (v2) > glsl/standalone_scaffolding: Add stub for _mesa_warning() > mesa,glsl: Move round_to_even() from glsl to mesa/main > mesa: Remove rounding bias in _mesa_float_to_half() > glsl: Evaluate constant GLSL ES 3.00 pack/unpack expressions (v2) > glsl/ir_factory: Initialize members to NULL in constructor > glsl/ir_builder: Add more helpers for constructing expressions > glsl/ir_factory: Add helper method for making an ir_constant > glsl/ir_builder: Add `enum writemask` > glsl/ir_builder: Add helpers for making if-statements > glsl: Reformat and/or/xor cases in ir_expression ctor > glsl: Fix type-deduction for and/or/xor expressions > glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2) > i965: Lower the GLSL ES 3.00 pack/unpack operations (v2) > i965: Add opcodes for F32TO16 and F16TO32 > i965: Quote the PRM on a HorzStride subtlety > i965/vs/gen7: Emit code for GLSL ES 3.00 pack/unpack operations > i965/fs/gen7: Emit code for GLSL 3.00 pack/unpack operations (v2) > > src/glsl/Makefile.am |2 + > src/glsl/Makefile.sources |1 + > src/glsl/builtin_compiler/Makefile.am |1 + > src/glsl/builtins/ir/packHalf2x16.ir |6 + > src/glsl/builtins/ir/packSnorm2x16.ir |6 + > src/glsl/builtins/ir/packUnorm2x16.ir |6 + > src/glsl/builtins/ir/unpackHalf2x16.ir |6 + > src/glsl/builtins/ir/unpackSnorm2x16.ir|6 + > src/glsl/builtins/ir/unpackUnorm2x16.ir|6 + > src/glsl/builtins/profiles/300es.glsl | 14 +- > src/glsl/ir.cpp| 36 +- > src/glsl/ir.h | 33 +- > src/glsl/ir_builder.cpp| 159 +++ > src/glsl/ir_builder.h | 72 ++ > src/glsl/ir_constant_expression.cpp| 208 +++- > src/glsl/ir_optimization.h | 20 + > src/glsl/ir_validate.cpp | 26 + > src/glsl/lower_packing_builtins.cpp| 1043 > > src/glsl/standalone_scaffolding.cpp| 18 + > src/glsl/standalone_scaffolding.h |3 + > src/mesa/drivers/dri/i965/brw_defines.h|3 + > src/mesa/drivers/dri/i965/brw_disasm.c |2 + > src/mesa/drivers/dri/i965/brw_eu.h |2 + > src/mesa/drivers/dri/i965/brw_eu_emit.c|7 +- > src/mesa/drivers/dri/i965/brw_fs.h |7 + > .../dri/i965/brw_fs_channel_expressions.cpp| 12 + > src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 39 +- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 82 +- > src/mesa/drivers/dri/i965/brw_shader.cpp | 32 + > src/mesa/drivers/dri/i965/brw_vec4.h |3 + > src/mesa/drivers/dri/i965/brw_vec4_emit.cpp|8 + > src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 155 +++ > src/mesa/main/imports.c| 86 +- > src/mesa/main/imports.h|3 + > src/mesa/program/ir_to_mesa.cpp| 12 +- > 35 files changed, 2061 insertions(+), 64 deletions(-) > create mode 100644 src/glsl/builtins/ir/packHalf2x16.ir > create mode 100644 src/glsl/builtins/ir/packSnorm2x16.ir > create mode 100644 src/glsl/builtins/ir/packUnorm2x16.ir > create mode 100644 src/glsl/builtins/ir/unpackHalf2x16.ir > create mode 100644 src/glsl/builtins/ir/unpackSnorm2x16.ir > create mode 100644 src/glsl/builtins/ir/unpackUnorm2x16.ir > create mode 100644 src/glsl/lower_packing_builtins.cpp > > -- > 1.8.1.1 FWIW patches 2, 3, 7, 15 and 16 (the ones I studied to implement the 4x8 builtins) are Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH (gles3) 00/20] i965: Implement GLSL ES 3.00 pack/unpack functions (v2)
On 21 January 2013 00:49, Chad Versace wrote: > This series lives on my gles3-glsl-packing branch. > > I tested this series against my piglit gles3-glsl-packing branch on > Ivybridge > and Sandybridge. No regressions relative to the Mesa gles3-d72ba278e. > > v2: > - Do all of idr's minor fixes. > - Improve the rounding bias in _mesa_float_to_half. > - For evaluating constant pack/unpackHalf2x16 expressions, use > _mesa_float_to_half/_mesa_half_to_float [for idr]. > - Add a bunch of new stuff to ir_builder. > - Rewrite the lowering pass using ir_builder [for idr]. > - In lowering packHalf2x16, don't truncate subnormal float16 values to > zero. > And round to even rather than to zero. [for stereotype441] > > > Chad Versace (20): > glsl: Fix typo in comment > glsl: Add IR lisp for GLSL ES 3.00 pack/unpack functions > glsl: Extend ir_expression_operation for GLSL 3.00 pack/unpack > functions (v2) > glsl/standalone_scaffolding: Add stub for _mesa_warning() > mesa,glsl: Move round_to_even() from glsl to mesa/main > mesa: Remove rounding bias in _mesa_float_to_half() > glsl: Evaluate constant GLSL ES 3.00 pack/unpack expressions (v2) > glsl/ir_factory: Initialize members to NULL in constructor > glsl/ir_builder: Add more helpers for constructing expressions > glsl/ir_factory: Add helper method for making an ir_constant > glsl/ir_builder: Add `enum writemask` > glsl/ir_builder: Add helpers for making if-statements > glsl: Reformat and/or/xor cases in ir_expression ctor > glsl: Fix type-deduction for and/or/xor expressions > glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2) > i965: Lower the GLSL ES 3.00 pack/unpack operations (v2) > i965: Add opcodes for F32TO16 and F16TO32 > i965: Quote the PRM on a HorzStride subtlety > i965/vs/gen7: Emit code for GLSL ES 3.00 pack/unpack operations > i965/fs/gen7: Emit code for GLSL 3.00 pack/unpack operations (v2) > I've already sent comments on patches 6, 7, and 15. Patches 1-3, 5, 8-14, 16, and 18 are: Reviewed-by: Paul Berry Patches 4 and 17 are: Acked-by: Paul Berry I'll try to look at patches 19 and 20 tomorrow morning. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev