Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up[mtl] fix renderpass clear operations #2129
Conversation
src/backend/metal/src/window.rs
Outdated
| @@ -16,7 +16,7 @@ use core_foundation::base::TCFType; | |||
| use core_foundation::string::CFString; | |||
| use core_foundation::dictionary::CFDictionary; | |||
| use core_foundation::number::CFNumber; | |||
| use core_graphics::base::CGFloat; | |||
| //use core_graphics::base::CGFloat; | |||
This comment has been minimized.
This comment has been minimized.
grovesNL
Jun 8, 2018
Member
Are we keeping these in gfx for now? Does it break hal/quad on your Retina display?
This comment has been minimized.
This comment has been minimized.
kvark
Jun 8, 2018
Member
Excellent point! They are broken. How about we only apply the scale when initialized via winit and ignore it otherwise?
src/backend/metal/src/command.rs
Outdated
| fn set_operations(attachment: &metal::RenderPassAttachmentDescriptorRef, ops: AttachmentOps) -> bool { | ||
| attachment.set_load_action(conv::map_load_operation(ops.load)); | ||
| attachment.set_store_action(conv::map_store_operation(ops.store)); | ||
| ops.load == AttachmentLoadOp::Clear |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kvark
Jun 8, 2018
Member
yeah, I agree. It is sooo tempting though. Would it be cleaner if I return something like:
OperationFollowup {
clear: bool,
}
kvark
added some commits
Jun 8, 2018
kvark
force-pushed the
kvark:mtl-ops
branch
from
3b9791c
to
62577b4
Jun 8, 2018
src/backend/metal/src/command.rs
Outdated
| @@ -1109,11 +1109,11 @@ impl pool::RawCommandPool<Backend> for CommandPool { | |||
| } | |||
| } | |||
|
|
|||
| // Sets up the load/store operations. Returns `true` if the clear color needs to be set. | |||
| fn set_operations(attachment: &metal::RenderPassAttachmentDescriptorRef, ops: AttachmentOps) -> bool { | |||
| /// Sets up the load/store operations. Returns `true` if the clear color needs to be set. | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
bors r=grovesNL |
bot
added a commit
that referenced
this pull request
Jun 9, 2018
This comment has been minimized.
This comment has been minimized.
bors
bot
merged commit c1cf138
into
gfx-rs:master
Jun 9, 2018
kvark
deleted the
kvark:mtl-ops
branch
Jun 9, 2018
bot
added a commit
that referenced
this pull request
Jun 12, 2018
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.
kvark commentedJun 8, 2018
Our big problem was unexpected clearing of the render passes, happened because:
create_render_passwith the clear ops setupcreate_framebuffer, set with exact texture referencesbegin_render_pass, and set the actual clear values..The PR eliminates the first instance of the descriptor, which greatly simplifies the code.
PR checklist:
makesucceeds (on *nix)make reftestssucceeds