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

Redefined buffer types #48

Closed
jaebaek opened this issue Nov 14, 2018 · 3 comments
Closed

Redefined buffer types #48

jaebaek opened this issue Nov 14, 2018 · 3 comments
Labels
amberscript Work related to AmberScript enhancement New feature or request

Comments

@jaebaek
Copy link
Contributor

jaebaek commented Nov 14, 2018

AmberScript's buffer type is confusing.

I feel that we should have the following buffer types:

  • color for color attachment of framebuffer
  • depth stencil for depth/stencil attachment of framebuffer
  • vertex for vertex buffer
  • index for index buffer
  • storage image
  • sampled image
  • combined image sampler
  • uniform texel buffer
  • storage texel buffer
  • storage buffer
  • uniform buffer
  • input attachment

Note that here we also uses the term 'buffer' for image because in the view of Amber script, the image is also a sequence of bytes.

Since storage image, sampled image, combined image sampler, uniform texel buffer, storage texel buffer, storage buffer, uniform buffer, and input attachment are Vulkan specific descriptor types and I am not sure WebGPU will define the same types or not, we would better consider how to support buffers of WebGPU efficiently.

@jaebaek jaebaek added the enhancement New feature or request label Nov 14, 2018
@jaebaek jaebaek added this to the AmberScript Parsing milestone Nov 14, 2018
@dj2
Copy link
Collaborator

dj2 commented Nov 14, 2018

For things like storage image and storage sampled, does the different matter from the Amber perspective? It's a bunch of contiguous bits. Do we need separate buffer types for them? Does the difference between storage image and storage buffer matter at the AmberScript level? How you use it on the backend would make that destinction, no?

@jaebaek
Copy link
Contributor Author

jaebaek commented Nov 14, 2018

As we discussed in offline, an alternative is to separate the type from buffer and add the type argument for DESCRIPTOR_SET command. In that way, the buffer is just a data blob and we can also run WebGPU resource types with the same data.

@dj2
Copy link
Collaborator

dj2 commented Nov 21, 2018

This was done in #66

@dj2 dj2 closed this as completed Nov 21, 2018
@dj2 dj2 added the amberscript Work related to AmberScript label Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amberscript Work related to AmberScript enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants