Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add half-float texturing and rendering #114

Open
anholt opened this issue Oct 24, 2018 · 2 comments
Open

Add half-float texturing and rendering #114

anholt opened this issue Oct 24, 2018 · 2 comments

Comments

@anholt
Copy link
Owner

anholt commented Oct 24, 2018

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

@nkreeger
Copy link

nkreeger commented Nov 5, 2018

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!

@anholt
Copy link
Owner Author

anholt commented Nov 5, 2018

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants