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

VideoBackends / VideoCommon: add type enum to dictate how the texture is used; support texture 2d #12372

Merged
merged 1 commit into from Dec 17, 2023

Conversation

iwubcode
Copy link
Contributor

@iwubcode iwubcode commented Dec 10, 2023

Dolphin leverages a (2D) texture array for all its GC/Wii native textures. However, to support more interesting graphical features, I expanded to add cube map (#12061 ) support. This worked but was done as a texture flag. Now I want to add support for a standard 2d texture. Having it as a flag is odd, so I introduced a new type enumeration that dictates what the texture format is. At the moment, the possibilities are 2d texture array, 2d texture, or cube map. In the future (if needed) this could be expanded to 3d textures, cube map arrays, etc as well.

This also adds support for 2d textures from a texture perspective (samplers need more work)

EDIT: Thank you @TellowKrinkle for the help on the Metal backend.

@iwubcode iwubcode force-pushed the texture_usage_flag branch 4 times, most recently from 73f1d72 to d793dd0 Compare December 10, 2023 01:58
@iwubcode iwubcode changed the title VideoBackends / VideoCommon: add usage flag to dictate how the texture is used VideoBackends / VideoCommon: add type flag to dictate how the texture is used; support texture 2d Dec 10, 2023
@iwubcode iwubcode changed the title VideoBackends / VideoCommon: add type flag to dictate how the texture is used; support texture 2d VideoBackends / VideoCommon: add type enum to dictate how the texture is used; support texture 2d Dec 10, 2023
@iwubcode iwubcode force-pushed the texture_usage_flag branch 2 times, most recently from a1f84e2 to 2ef4317 Compare December 10, 2023 02:32
Copy link
Contributor

@TellowKrinkle TellowKrinkle left a comment

Choose a reason for hiding this comment

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

Looked over the code but didn't test it

…re is a 2D texture, a texture array, or a cube map; support 2D texture type across backends

Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
@dolphin-ci
Copy link

dolphin-ci bot commented Dec 15, 2023

FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:

automated-fifoci-reporter

@lioncash lioncash merged commit f589c04 into dolphin-emu:master Dec 17, 2023
11 checks passed
@iwubcode iwubcode deleted the texture_usage_flag branch December 17, 2023 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants