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

Rename shaderc_spv_module to shaderc_compilation_result #126

Conversation

Qining
Copy link
Contributor

@Qining Qining commented Feb 12, 2016

No description provided.

@Qining
Copy link
Contributor Author

Qining commented Feb 12, 2016

We still have a lot of C API function named like: shaderc_module_*.

Do we need to modify them, as we don't have a type named shaderc_spv_module anymore?

@Qining Qining force-pushed the rename-shaderc_spv_module-to-shaderc_compilation_result branch from 92ae3f7 to 523062d Compare February 12, 2016 17:02
void shaderc_module_release(shaderc_spv_module_t module);
// Releases the resources held by the result module. It is invalid to use the
// module for any further operations.
void shaderc_module_release(shaderc_compilation_result_t module);
Copy link

Choose a reason for hiding this comment

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

I find module a bit confusing now that it's unrelated to the type name. Perhaps we can rename it to result?

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1
So shaderc_result_release?

The primary job of shaderc is to produce a compilation result, so there should be no problem interpreting "result" in this case.

Copy link

Choose a reason for hiding this comment

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

Yes, plus name the parameter result and adjust the blurb accordingly.

@dekimir
Copy link

dekimir commented Feb 12, 2016

I would change the function names, too. Otherwise they'll send confusing signals to the reader.

@@ -93,7 +94,7 @@ class SpvModule {
SpvModule(const SpvModule& other) = delete;
SpvModule& operator=(const SpvModule& other) = delete;

shaderc_spv_module_t module_;
shaderc_compilation_result_t module_;
Copy link
Collaborator

Choose a reason for hiding this comment

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

rename module_ to compilation_result_

@dneto0
Copy link
Collaborator

dneto0 commented Feb 12, 2016

-1
Yes, I think the shaderc_module_* methods should be renamed to shadercr_result_*. I think.

@Qining Qining force-pushed the rename-shaderc_spv_module-to-shaderc_compilation_result branch from 523062d to d125ce4 Compare February 12, 2016 21:46
@Qining
Copy link
Contributor Author

Qining commented Feb 12, 2016

Updated both C and CPP API.

I guess the word "result module' in comments should be fine?

@dekimir
Copy link

dekimir commented Feb 12, 2016

I guess the word "result module' in comments should be fine?

Nope, it's equally confusing in comments as it was in the names. :)

@Qining
Copy link
Contributor Author

Qining commented Feb 15, 2016

Replace 'result module' in comments with 'result object'.
Rename a status enum member: shaderc_compilation_status_null_result_module to shaderc_compilation_status_null_result_object.

// further operations.
void shaderc_module_release(shaderc_spv_module_t module);
// Releases the resources held by the result object. It is invalid to use the
// the data held by the result object for any further operations.
Copy link

Choose a reason for hiding this comment

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

Typo: "the the". Also, I'd remove the entire phrase "the data held by" and keep just "the result object".

@Qining Qining force-pushed the rename-shaderc_spv_module-to-shaderc_compilation_result branch 4 times, most recently from 7014c25 to 14465d4 Compare February 17, 2016 18:32
Rename the result object from shaderc_spv_module to
shaderc_compilation_result. Also rename the involved methods, variables,
and handlers.

Rename an enum status: shaderc_compilation_status_null_result_module to
shaderc_compilation_status_null_result_object.
@Qining Qining force-pushed the rename-shaderc_spv_module-to-shaderc_compilation_result branch from 14465d4 to 763eff0 Compare February 17, 2016 20:26
@dneto0
Copy link
Collaborator

dneto0 commented Feb 17, 2016

+2

@dneto0 dneto0 merged commit 763eff0 into google:master Feb 17, 2016
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.

None yet

3 participants