-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Shader Extension Proposal #202
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Ethan Lee <[email protected]> Co-authored-by: Caleb Cornett <[email protected]>
@@ -166,7 +166,8 @@ typedef enum FNA3D_CubeMapFace | |||
typedef enum FNA3D_BufferUsage | |||
{ | |||
FNA3D_BUFFERUSAGE_NONE, | |||
FNA3D_BUFFERUSAGE_WRITEONLY | |||
FNA3D_BUFFERUSAGE_WRITEONLY, | |||
FNA3D_BUFFERUSAGE_COMPUTE_EXT /* SDL shader extension only */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean 'usable by compute AND write only'? Or is it a bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value is actually completely ignored on every backend, so setting COMPUTE_EXT on the SDL backend is the only place this would actually matter.
include/FNA3D.h
Outdated
*/ | ||
FNA3DAPI void FNA3D_BindComputeTexturesEXT( | ||
FNA3D_Device *device, | ||
SDL_GpuComputeTextureBinding *pBindings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a blessed way to feed FNA3D textures in to this? Or would you use a SysTexture?
From looking at this it seems like in this proposal, fragment/vertex shaders ('graphics' shaders) can only consume FNA3D textures, and compute shaders can only consume raw SDL_Gpu textures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FNA3D texture handles are just sdl_gpu texture handles, but I agree that this is awkward... I'll just wrap the SDL struct and handle it in the implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I was wrong and FNA3D_Driver_SDL was wrapping the texture handles. So nice catch!
a7054d7
to
a7138eb
Compare
5cddd4b
to
2886b44
Compare
ddc9f3d
to
937d457
Compare
52de327
to
76667e0
Compare
25143a6
to
e1b7046
Compare
001f3e4
to
cebc421
Compare
Tried to create something that would be as minimally invasive to the rest of the API as possible. When using the graphics shader extension, the rest of the API is still used normally, only the Effect calls are omitted.
Technically this doesn't break ABI because isRenderTarget on CreateTexture_ is now interpreted as a bitflag, but the value was always 1 or 0 before.