RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

Simplified Parameter Parsing to have all all shader formats use the same slang method

Open HyperspaceMadness opened this issue 1 year ago • 6 comments

Cleanup/Simplification of shader parameter resolution process

Originally if the parameter resolution was a different code path if it was a slang shader or not even though the parameter resolution was actually supposed to be the same.

This PR removes one of the two paths so that the same parameter resolution is used for both.

Tested with both slang and glsl shaders

Reviewers

@hizzlekizzle

HyperspaceMadness avatar Jun 22 '24 16:06 HyperspaceMadness

ah, so it was meant to be removed at some point anyway, it seems, and was just kept around until someone could test it properly?

hizzlekizzle avatar Jun 22 '24 16:06 hizzlekizzle

Yeah that's right, the expectation seems to be to remove it after it was tested.

In looking at the newer code it is more robust with checking if there are multiple parameters but with different values and flagging this.

HyperspaceMadness avatar Jun 22 '24 16:06 HyperspaceMadness

hmm, looks like a bunch of CI builds failed, presumably because they tried to take the now-removed codepath.

hizzlekizzle avatar Jun 22 '24 21:06 hizzlekizzle

Yes the CI fails need to be addressed by the author.

LibretroAdmin avatar Jul 13 '24 18:07 LibretroAdmin

The problem with this PR is that it will fail if HAVE_SLANG and HAVE_SPIRV_CROSS are not defined.

That's why the CI jobs are failing rn.

LibretroAdmin avatar Aug 22 '24 19:08 LibretroAdmin

Ah, I see the problem, I'll see if I can move the function over which would avoid duplication of code or the need for the HAS defines.

HyperspaceMadness avatar Aug 23 '24 23:08 HyperspaceMadness

Hi @HyperspaceMadness ,

let me know if this commit replaces your PR and works as intended. Then we can close this PR.

https://github.com/libretro/RetroArch/commit/d60d320e76a58fba0870d653f21719a18ebbd13e

LibretroAdmin avatar Sep 08 '24 13:09 LibretroAdmin

Yes, I think this is ok.

HyperspaceMadness avatar Sep 09 '24 12:09 HyperspaceMadness