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

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

kokoko3k
Copy link

…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.

@hizzlekizzle
Copy link
Contributor

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

@HyperspaceMadness
Copy link
Contributor

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

@kokoko3k
Copy link
Author

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 ^_^
2e8bd62

@LibretroAdmin
Copy link
Contributor

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.

Copy link
Author

@kokoko3k kokoko3k Nov 28, 2023

Choose a reason for hiding this comment

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

Hope I did right to use width and height instead of gl->tex_w and gl->tex_h

@LibretroAdmin
Copy link
Contributor

Can this PR be merged at this point?

@hizzlekizzle
Copy link
Contributor

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

chyyran added a commit to SnowflakePowered/librashader that referenced this pull request Feb 12, 2024
chyyran added a commit to SnowflakePowered/librashader that referenced this pull request Feb 12, 2024
@hizzlekizzle
Copy link
Contributor

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

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

4 participants