google / shaderc

A collection of tools, libraries, and tests for Vulkan shader compilation.
Other
1.86k stars 362 forks source link

Handle includer_ in CompileOptions copy/move constructors #1359

Open pknowles opened 1 year ago

pknowles commented 1 year ago

Copying CompileOptions() results in a new object with *possibly dangling pointers to the old include callbacks. This patch just clears them, since includer_ doesn't have a way to clone() it.

Moving CompileOptions() moves options but not includer. This patch moves includer_ too.

*I'm not sure about the implementation of shaderc_compile_options_clone(), but I wouldn't be surprised if the callbacks get copied too. Can someone say if this part of the change is useful?

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.