Re: [Mesa-dev] [RFC 00/12] anv: A first pass at VK_KHX_multiview
On Thu, 2017-03-23 at 14:28 +0100, Iago Toral wrote: > The proposed implementation makes sense to me, I looked through > patches > 1-8 and they all look good as well, so those are: Pateches 9, 19 and 12 are also: Reviewed-by: Iago Toral QuirogaI left some comments in patch 11. > Reviewed-by: Iago Toral Quiroga > > I still have to look into the actual meat of the implementation > (patches 9-12), I'll do that tomorrow if nobody else beats me to it. > > Iago > > On Wed, 2017-03-22 at 21:00 -0700, Jason Ekstrand wrote: > > > > This little series is a first pass at implementing the > > VK_KHX_multiview > > extension. The basic method employed is to multiply the number of > > instances in each draw call by the number of views in the > > subpass. We then > > emit shader code to sort out the gl_InstanceId and gl_ViewIndex > > builtin > > variables. Properly computing gl_ViewIndex takes a bit of work > > because > > gl_InstanceId % bitcount(subpass->view_mask) is not quite the view > > index we > > want. We have to convert from this "compacted" view index to the > > actual > > view index by use of a remap table. > > > > This implementation is good enough to get us going with the > > extension > > and > > passes the currently available CTS tests. However, it does not yet > > support > > input attachments. > > > > Jason Ekstrand (12): > > compiler: Add a system value and varying for ViewIndex > > spirv: Bump the SPIR-V header to the latest public version > > spirv: Add support for SPV_KHR_multiview > > anv/nir: Delete the apply_dynamic_offsets prototype > > anv: Add the KHX_multiview boilerplate > > anv/pass: Store the per-subpass view mask > > anv/pipeline: Call nir_gather_info later > > anv/pipeline: Add a subpass field to anv_pipeline > > anv/pipeline: Add shader lowering for multiview > > anv/cmd_buffer: Pull indirect draw parameter loading into a > > helper > > anv/cmd_buffer: Emit instanced draws for multiple views > > anv: Enable VK_KHX_multiview and SPV_KHR_multiview > > > > src/compiler/nir/nir.c | 4 + > > src/compiler/nir/nir_intrinsics.h | 1 + > > src/compiler/shader_enums.c| 2 + > > src/compiler/shader_enums.h| 4 + > > src/compiler/spirv/nir_spirv.h | 1 + > > src/compiler/spirv/spirv.h | 34 - > > src/compiler/spirv/spirv_to_nir.c | 4 + > > src/compiler/spirv/vtn_variables.c | 4 + > > src/intel/Makefile.sources | 1 + > > src/intel/vulkan/anv_device.c | 23 ++- > > src/intel/vulkan/anv_entrypoints_gen.py| 1 + > > src/intel/vulkan/anv_nir.h | 5 +- > > src/intel/vulkan/anv_nir_lower_multiview.c | 235 > > + > > src/intel/vulkan/anv_pass.c| 19 +++ > > src/intel/vulkan/anv_pipeline.c| 19 ++- > > src/intel/vulkan/anv_private.h | 9 ++ > > src/intel/vulkan/genX_cmd_buffer.c | 173 > > +++-- > > src/intel/vulkan/genX_pipeline.c | 10 +- > > 18 files changed, 521 insertions(+), 28 deletions(-) > > create mode 100644 src/intel/vulkan/anv_nir_lower_multiview.c > > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC 00/12] anv: A first pass at VK_KHX_multiview
The proposed implementation makes sense to me, I looked through patches 1-8 and they all look good as well, so those are: Reviewed-by: Iago Toral QuirogaI still have to look into the actual meat of the implementation (patches 9-12), I'll do that tomorrow if nobody else beats me to it. Iago On Wed, 2017-03-22 at 21:00 -0700, Jason Ekstrand wrote: > This little series is a first pass at implementing the > VK_KHX_multiview > extension. The basic method employed is to multiply the number of > instances in each draw call by the number of views in the > subpass. We then > emit shader code to sort out the gl_InstanceId and gl_ViewIndex > builtin > variables. Properly computing gl_ViewIndex takes a bit of work > because > gl_InstanceId % bitcount(subpass->view_mask) is not quite the view > index we > want. We have to convert from this "compacted" view index to the > actual > view index by use of a remap table. > > This implementation is good enough to get us going with the extension > and > passes the currently available CTS tests. However, it does not yet > support > input attachments. > > Jason Ekstrand (12): > compiler: Add a system value and varying for ViewIndex > spirv: Bump the SPIR-V header to the latest public version > spirv: Add support for SPV_KHR_multiview > anv/nir: Delete the apply_dynamic_offsets prototype > anv: Add the KHX_multiview boilerplate > anv/pass: Store the per-subpass view mask > anv/pipeline: Call nir_gather_info later > anv/pipeline: Add a subpass field to anv_pipeline > anv/pipeline: Add shader lowering for multiview > anv/cmd_buffer: Pull indirect draw parameter loading into a helper > anv/cmd_buffer: Emit instanced draws for multiple views > anv: Enable VK_KHX_multiview and SPV_KHR_multiview > > src/compiler/nir/nir.c | 4 + > src/compiler/nir/nir_intrinsics.h | 1 + > src/compiler/shader_enums.c| 2 + > src/compiler/shader_enums.h| 4 + > src/compiler/spirv/nir_spirv.h | 1 + > src/compiler/spirv/spirv.h | 34 - > src/compiler/spirv/spirv_to_nir.c | 4 + > src/compiler/spirv/vtn_variables.c | 4 + > src/intel/Makefile.sources | 1 + > src/intel/vulkan/anv_device.c | 23 ++- > src/intel/vulkan/anv_entrypoints_gen.py| 1 + > src/intel/vulkan/anv_nir.h | 5 +- > src/intel/vulkan/anv_nir_lower_multiview.c | 235 > + > src/intel/vulkan/anv_pass.c| 19 +++ > src/intel/vulkan/anv_pipeline.c| 19 ++- > src/intel/vulkan/anv_private.h | 9 ++ > src/intel/vulkan/genX_cmd_buffer.c | 173 > +++-- > src/intel/vulkan/genX_pipeline.c | 10 +- > 18 files changed, 521 insertions(+), 28 deletions(-) > create mode 100644 src/intel/vulkan/anv_nir_lower_multiview.c > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC 00/12] anv: A first pass at VK_KHX_multiview
This little series is a first pass at implementing the VK_KHX_multiview extension. The basic method employed is to multiply the number of instances in each draw call by the number of views in the subpass. We then emit shader code to sort out the gl_InstanceId and gl_ViewIndex builtin variables. Properly computing gl_ViewIndex takes a bit of work because gl_InstanceId % bitcount(subpass->view_mask) is not quite the view index we want. We have to convert from this "compacted" view index to the actual view index by use of a remap table. This implementation is good enough to get us going with the extension and passes the currently available CTS tests. However, it does not yet support input attachments. Jason Ekstrand (12): compiler: Add a system value and varying for ViewIndex spirv: Bump the SPIR-V header to the latest public version spirv: Add support for SPV_KHR_multiview anv/nir: Delete the apply_dynamic_offsets prototype anv: Add the KHX_multiview boilerplate anv/pass: Store the per-subpass view mask anv/pipeline: Call nir_gather_info later anv/pipeline: Add a subpass field to anv_pipeline anv/pipeline: Add shader lowering for multiview anv/cmd_buffer: Pull indirect draw parameter loading into a helper anv/cmd_buffer: Emit instanced draws for multiple views anv: Enable VK_KHX_multiview and SPV_KHR_multiview src/compiler/nir/nir.c | 4 + src/compiler/nir/nir_intrinsics.h | 1 + src/compiler/shader_enums.c| 2 + src/compiler/shader_enums.h| 4 + src/compiler/spirv/nir_spirv.h | 1 + src/compiler/spirv/spirv.h | 34 - src/compiler/spirv/spirv_to_nir.c | 4 + src/compiler/spirv/vtn_variables.c | 4 + src/intel/Makefile.sources | 1 + src/intel/vulkan/anv_device.c | 23 ++- src/intel/vulkan/anv_entrypoints_gen.py| 1 + src/intel/vulkan/anv_nir.h | 5 +- src/intel/vulkan/anv_nir_lower_multiview.c | 235 + src/intel/vulkan/anv_pass.c| 19 +++ src/intel/vulkan/anv_pipeline.c| 19 ++- src/intel/vulkan/anv_private.h | 9 ++ src/intel/vulkan/genX_cmd_buffer.c | 173 +++-- src/intel/vulkan/genX_pipeline.c | 10 +- 18 files changed, 521 insertions(+), 28 deletions(-) create mode 100644 src/intel/vulkan/anv_nir_lower_multiview.c -- 2.5.0.400.gff86faf ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev