RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

[draft] / [don't merge] Add support for scale_to = original in slang …

Open kokoko3k opened this issue 2 years ago • 7 comments

…presets for vulkan and glcore drivers

Description

Retroarch supports source,viewport,absolute in shader presets, now it supports "original" too, which is handy for shader writers if they want to return to original dimensions after using anything but "source" in the previous passes.

Reviewers

@Hunterk suggested me to open this as a draft, since i was unable to implement the feature for remaining output drivers.

kokoko3k avatar Nov 21 '23 12:11 kokoko3k

@HyperspaceMadness I know you've been interested in this capability for some time.

hizzlekizzle avatar Nov 21 '23 13:11 hizzlekizzle

Looks really good, we just need to get the other drivers covered then we're golden!

@kokoko3k you may want to adjust your commit to keep all the original formatting except in the areas you changed code in,it will make this easier to review

HyperspaceMadness avatar Nov 22 '23 14:11 HyperspaceMadness

Looks really good, we just need to get the other drivers covered then we're golden!

@kokoko3k you may want to adjust your commit to keep all the original formatting except in the areas you changed code in,it will make this easier to review

I've messed it a bit, btw, the readable commit is this ^_^ 2e8bd62ae597439e97dd9e1158ed357846bd8adf

kokoko3k avatar Nov 24 '23 08:11 kokoko3k

OK, so the only error that precludes all tests from passing is this -

gfx/drivers/gl2.c:1818:15: error: enumeration value 'RARCH_SCALE_ORIGINAL' not handled in switch [-Werror,-Wswitch] switch (fbo_scale->type_x) ^~~~~~~~~~~~~~~~~ gfx/drivers/gl2.c:1842:15: error: enumeration value 'RARCH_SCALE_ORIGINAL' not handled in switch [-Werror,-Wswitch] switch (fbo_scale->type_y) ^~~~~~~~~~~~~~~~~

If this can be addressed, we can proceed with this PR.

LibretroAdmin avatar Nov 26 '23 03:11 LibretroAdmin

Can this PR be merged at this point?

LibretroAdmin avatar Dec 21 '23 00:12 LibretroAdmin

@LibretroAdmin it's only for glcore and vulkan currently (i.e., no d3d*). If that's okay, then it's probably fine.

hizzlekizzle avatar Dec 21 '23 01:12 hizzlekizzle

lol looks like librashader already merged "original" scale. We gotta keep up! :P

hizzlekizzle avatar Feb 22 '24 21:02 hizzlekizzle