-
Notifications
You must be signed in to change notification settings - Fork 505
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
sokol-gfx: finalize wgpu backend #865
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…uDeviceGetLimits() shim
…ormat_Depth32FloatStencil8
…nvas_selector change
…ort clipping (even if this is wrong)
…for depth-stencil textures
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IMPORTANT NOTE: WebGPU currently has a design bug that viewport rectangles must be contained within the framebuffer boundaries (but technically this is only required for scissor rects). This makes it impossible to make the WebGPU backend behave identical with the other backends for viewport rectangles that clip the framebuffer boundaries (rendering will become distored).
TODO:
wgpu/
to check against native Dawn:check what's going on down in the Metal debugger(Dawn doesn't work with the Metal debugger it seems)attempt 2: go back to our own uniform buffer conveyor belt implementationany way to optimize the uniform SetBindGroup with dynamic offsets?@group(0) @binding(4)
, not@group(0) @binding(0)
copySize.width (2) is not a multiple of compressed texture format block width (4).
SG_SAMPLERTYPE_NONFILTERING
=>WGPUSamplerBindingType_NonFiltering
sokol-shdc:this information doesn't belong in the shader, because the same shader source for a filtering vs non-filtering texture access is the same, the difference is only on the binding side (the bound texture and sampler must match), new approach: patch image-sample-type and sampler-type into sg_shader_desc that's returned from code generation (sucks but should be a fairly rare case)SG_IMAGESAMPLETYPE_UNFILTERABLE_FLOAT
SG_SAMPLERTYPE_NONFILTERING
@image_sample_type [texname] unfilterable_float
@sampler_type [smpname] nonfiltering
tex/smpname doesn't existthis doesn't work when code is conditionally compiled with#ifdef
(because tags are not affected by the conditional compilation - so GLSL textures or samplers my be removed by conditional compilation, and that can't be detected by the tag-validation, doh)texture sample type doesn't match sampler typein debug mode, wgpu errors should be reported at function exit, not at end of frame(error reporting is handled automatically when running in browser)sg_image.data overhaul:write a mipmapped cubemap sample (switch through mipmaps with keys)Breaking changes:
Emscripten-related problems: