[Mesa-dev] [RFC 00/24] nvc0: ARB_shader_image_load_store/size on GK104

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Apr 12 23:56:50 UTC 2016


Hi,

This series adds support for ARB_shader_image_load_store (GL 4.2) and
ARB_shader_image_size (GL 4.3) on GK104 and will expose OpenGL 4.2 on
this chipset.

Other chipsets like Fermi, Kepler2 (ie. GK110) and Maxwell will be implemented
later. Actually, I already have a series for Fermi (based on previous work by
Ilia Mirkin), but still have a bunch of things to fix. About GK110, I hope
that adding code emission for surfaces instructions should be enough to make it
work but I need to double check. No clue for Maxwell yet.

Note that 3D images are only partially supported but this doesn't matter
because they do not seem to be really used. Anyway, this could be added later
if an app requires them.

The list of dEQP/piglit fails is available below.

Please review,
Thanks!

Ilia Mirkin (2):
  nv50/ir: add support for SULDP -> SULDB conversion
  nvc0: enable ARB_shader_image_load_store on GK104

Samuel Pitoiset (22):
  nvc0: add preliminary support for images
  nvc0: reserve an area for surfaces info in the driver constbuf
  nvc0: bind images on compute shaders for Kepler
  nvc0: bind images on 3D shaders for Kepler
  nvc0: compute correct image dimensions based on the target
  nvc0: fix address offset when images have multiple levels
  nvc0: shift address with blocksize for image buffers
  nvc0: enable RGB10_A2UI format on GK104
  nvc0: add missing glMemoryBarrier bits
  nv50/ir: add support for TGSI image declarations
  nv50/ir: re-introduce TGSI lowering pass for images
  nvc0/ir: fix constraints for OP_SUSTx on Kepler
  nv50/ir: enable early fragment test with explicit user control
  nv50/ir: add OP_BUFQ for buffers query
  nv50/ir: make use of OP_SUQ for surfaces query
  nvc0/ir: fix cube images for Kepler
  nvc0/ir: fix 1D arrays images for Kepler
  nvc0/ir: add indirect support for images on Kepler
  nvc0/ir: prevent out of bounds when no images are bound
  nvc0: reduce GL_MAX_3D_TEXTURE_SIZE to 2048 on Kepler+
  nvc0: inform users that 3D images are not fully supported
  nvc0: expose GLSL version 420 on GK104

 src/gallium/drivers/nouveau/codegen/nv50_ir.cpp    |  49 ++++
 src/gallium/drivers/nouveau/codegen/nv50_ir.h      |  72 +++++
 .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp  | 272 ++++++++++++++++++-
 .../drivers/nouveau/codegen/nv50_ir_inlines.h      |   6 +-
 .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp      | 293 ++++++++++++++++-----
 .../nouveau/codegen/nv50_ir_lowering_nvc0.h        |   4 +-
 .../drivers/nouveau/codegen/nv50_ir_print.cpp      |   1 +
 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp |   4 +-
 .../drivers/nouveau/codegen/nv50_ir_target.cpp     |   3 +
 src/gallium/drivers/nouveau/nvc0/nvc0_compute.c    |   4 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_context.c    |  26 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_context.h    |  15 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_program.c    |   8 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c     |   8 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.h     |   1 +
 src/gallium/drivers/nouveau/nvc0/nvc0_state.c      |  53 +++-
 .../drivers/nouveau/nvc0/nvc0_state_validate.c     |   9 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_tex.c        | 140 +++++++---
 src/gallium/drivers/nouveau/nvc0/nve4_compute.c    |  39 ++-
 19 files changed, 870 insertions(+), 137 deletions(-)

-- 
2.8.0

** dEQP **
deqp-gles31/functional/image_load_store/3d/load_store/r32f_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/r32i_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/r32ui_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba16f_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba16i_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba16ui_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba32f_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba32i_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba32ui_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba8_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba8_snorm_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba8i_single_layer: fail
deqp-gles31/functional/image_load_store/3d/load_store/rgba8ui_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/r32f_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/r32i_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/r32ui_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba16f_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba16i_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba16ui_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba32f_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba32i_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba32ui_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba8_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba8_snorm_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba8i_single_layer: fail
deqp-gles31/functional/image_load_store/3d/store/rgba8ui_single_layer: fail

3D images are not fully suppported as explained.

** piglit **
spec/arb_shader_image_load_store/invalid/imageAtomicAdd/address bounds test/imageBuffer/r32ui: fail
spec/arb_shader_image_load_store/invalid/imageAtomicAnd/address bounds test/imageBuffer/r32ui: fail
spec/arb_shader_image_load_store/invalid/imageAtomicCompSwap/address bounds test/imageBuffer/r32ui: fail
spec/arb_shader_image_load_store/invalid/imageAtomicMax/address bounds test/imageBuffer/r32ui: fail
spec/arb_shader_image_load_store/invalid/imageAtomicMin/address bounds test/imageBuffer/r32ui: fail
spec/arb_shader_image_load_store/invalid/imageAtomicOr/address bounds test/imageBuffer/r32ui: fail
spec/arb_shader_image_load_store/invalid/imageAtomicXor/address bounds test/imageBuffer/r32ui: fail
spec/arb_shader_image_load_store/invalid/imageLoad/address bounds test/imageBuffer/rgba32f: fail

No clue why these subtests fail because the predicate seems to be correctly
set on suclamp. We probably need to add an other sanity check for this
robustness thing. Will have a deeper look later.

spec/arb_shader_image_load_store/layer/image3D/non-layered binding test: fail
spec/arb_shader_image_load_store/max-size/image3D max size test/8x8x2048x1: fail

3D images are not fully suppported as explained.


More information about the mesa-dev mailing list