pcsx2 icon indicating copy to clipboard operation
pcsx2 copied to clipboard

Shaderc: Make non-semantic debug optional

Open kamfretoz opened this issue 1 year ago • 1 comments

Description of Changes

This PR drops the hard requirement and the dependencies on the patched shaderc (so you can build PCSX2 without the patch if you choose to do so), whilst still reserving the patch for those who needs/wants it (non-semantic debug changes).

Rationale behind Changes

This should go along nicely with the package mode.

Suggested Testing Steps

See if the CI passes and nothing else broke.

kamfretoz avatar Oct 01 '24 15:10 kamfretoz

~~Quickly added a close menu hint to the savestate selector UI to let the user know they can do so.~~ Decided to put it into separate PR.

kamfretoz avatar Oct 02 '24 06:10 kamfretoz

So, you've removed like 90% of the patch. The idea was to support the existing patch and an unpatched shaderc. Ideally you'd only change one line in the patch, the addition of #define SHADERC_PCSX2_CUSTOM 1.

What's the point of the part of the patch they removed? From my perspective, all it seems to do is mess with the signatures of a bunch of methods to return a status code separately from the rest of the results, but that status code can be fetched from the shaderc_compilation_result_t anyways, so I don't see why it's important. It does however make it much more painful to support both shaderc at the same time, since now every method is different.

I guess you can now get an error code even if shaderc fails to even allocate a result struct, but that feels fairly unlikely and we'll still print a (fairly unique) "null result object" for that.

TellowKrinkle avatar Nov 23 '24 02:11 TellowKrinkle

I trust your judgement on the issue. I was not expecting the original patch to be completely modified. In all honesty I can't confidently review the shaderc changes beyond if it compiles or not, hence my original expectation of it being relatively unchanged.

F0bes avatar Nov 23 '24 02:11 F0bes

I re-added the result error code stringification, PCSX2-side this time, so it'll work regardless of what shaderc you use

TellowKrinkle avatar Nov 23 '24 02:11 TellowKrinkle