mesa icon indicating copy to clipboard operation
mesa copied to clipboard

Add half-float texturing and rendering

Open anholt opened this issue 6 years ago • 2 comments

Things we would need to do for sure:

  • Add the RGBA16f format to src/gallium/drivers/vc4/vc4_formats.c based on RGBA16f in V3D_IDENT1 bit 24

  • Add "is a float texture" to the texture shader key (v3d_setup_shared_key())

  • Update the kernel's vc4_validate.c to know about RGBA64's texture cpp.

  • Use "is a float texture" to do two texture loads per sample and unpack 16f instead of 8-bit unorm in vc4_program.c.

  • Add "is a float render target" to the FS key

  • Use "is a float render target" to do two writes to the render target with 16f components instead of one with 8-bit unorm components.

  • Update the kernel's vc4_render_cl.c to know about "HDR" color stores.

  • Apply workaround for HW-2619 and HW-2645 noted in the HW specifications at https://docs.broadcom.com/docs/12358545

anholt avatar Oct 24 '18 19:10 anholt

Question about v3d and the vc4 driver - I've been digging through the mesa source code and it is not clear to me how the v3d library is used with the vc4 driver? Any tips or links to source code that can point out how this works? Thanks!

nkreeger avatar Nov 05 '18 19:11 nkreeger

When I started on the v3d driver, I basically just forked vc4. Some code is shared, like the CL decoding from the XML spec. There are also pieces I want to merge back together, like the debug environment variable flags. And I've wondered if I could rework QIR/VIR to be shared somehow, but I'm not sure if that wouldn't be more work than the lines-of-code savings (they get smaller, anyway, as we move more logic into NIR passes).

anholt avatar Nov 05 '18 22:11 anholt