Skip to content

Insert the shader name in the source. #1821

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

Merged
merged 1 commit into from
Oct 6, 2017
Merged

Conversation

nical
Copy link
Contributor

@nical nical commented Oct 6, 2017

This makes life easier when looking at apitrace recordings.


This change is Reviewable

This makes life easier when looking at apitrace recordings.
@nical
Copy link
Contributor Author

nical commented Oct 6, 2017

r? @kvark or @glennw

@@ -183,6 +183,11 @@ pub fn build_shader_strings(
vs_source.push_str(gl_version_string);
fs_source.push_str(gl_version_string);

// Insert the shader name to make debugging easier.
let name_string = format!("// {}\n", base_filename);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps, it would make sense to do in debug only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use apitrace with release builds too and I don't think this adds any noticeable overhead so I lean towards leaving it in release builds as well unless you feel strongly about it.

@kvark
Copy link
Member

kvark commented Oct 6, 2017

Okey
@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 6bae0eb has been approved by kvark

@bors-servo
Copy link
Contributor

⌛ Testing commit 6bae0eb with merge 582b0ac...

bors-servo pushed a commit that referenced this pull request Oct 6, 2017
Insert the shader name in the source.

This makes life easier when looking at apitrace recordings.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1821)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: kvark
Pushing 582b0ac to master...

@bors-servo bors-servo merged commit 6bae0eb into servo:master Oct 6, 2017
@nical nical deleted the shader-names branch October 7, 2017 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants