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

Vulkan: Use compute shader for RealXFB decoding #5477

Closed
wants to merge 5 commits into from
Closed

Vulkan: Use compute shader for RealXFB decoding #5477

wants to merge 5 commits into from

Conversation

stenzek
Copy link
Contributor

@stenzek stenzek commented May 25, 2017

Ends up being slightly faster (38% in a purely XFB upload bound scenario), but mainly trying to find a solution to the black screen/incorrect colours issue.

@stenzek stenzek changed the title Vulkan: Use compute shaders for RealXFB decoding Vulkan: Use compute shader for RealXFB decoding May 25, 2017
@JMC47
Copy link
Contributor

JMC47 commented May 25, 2017

@dolphin-emu-bot rebuild

@JMC47
Copy link
Contributor

JMC47 commented May 25, 2017

I didn't notice much of a performance difference, but if it's a performance up and realXFB works fine still, that's nice for me.

@degasus
Copy link
Member

degasus commented May 26, 2017

Is there a good way to share more code with the texture decoder of the vulkan backend?

@iwubcode
Copy link
Contributor

iwubcode commented May 26, 2017

@degasus - what if we shared this once AbstractTextures was merged? We could have a function called ConvertDataToRGBFormat(const void* src_ptr, u32 src_width, u32 src_stride, u32 src_height, ConversionFormat) on the texture? I think we'd have to fallback to CPU if there weren't any compute-shaders though.

This would fall in line with the conversation on IRC yesterday about hybrid-xfb and doing YCbCr to RGB on the GPU if possible.

So we'd support converting both formats (YCbCr and YUYV) to RGB using either GPU or CPU?

@stenzek
Copy link
Contributor Author

stenzek commented May 26, 2017

@degasus Yup, I don't see why it couldn't be added as another format for the texture decoding shaders.

@phire
Copy link
Member

phire commented May 26, 2017

Hybrid XFB requires a XFB decoding shader anyway.

@iwubcode
Copy link
Contributor

iwubcode commented May 27, 2017

@phire - isn't that just another 'flavor' of converting some data to RGB format?


float y = mix(c0.r, c0.b, (uv.x & 1) == 1);
float y = mix(yuyv.r, yuyv.b, (uv.x & 1u) == 1u);

This comment was marked as off-topic.

@psennermann
Copy link

Is it possible to have a build link to test if this PR really fixes the black screen on Vulkan XFB?
Thanks

@JMC47
Copy link
Contributor

JMC47 commented Jun 16, 2017

Click show all tests and find the buildbot for whatever version you're using (Windows x64 for most people) and click details. On that page you'll be able to find a download link to the test build.

@psennermann
Copy link

Oh thanks, unfortunately the black screen is still there...

@mimimi085181
Copy link
Contributor

For me it did not fix the black screen issue. I have high hopes for #5498 though.

@iwubcode iwubcode mentioned this pull request Aug 8, 2017
@stenzek
Copy link
Contributor Author

stenzek commented Nov 19, 2017

Irrelevant now that Hybrid XFB has been merged.

@stenzek stenzek closed this Nov 19, 2017
@stenzek stenzek deleted the vulkan-xfb-2 branch February 19, 2018 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

8 participants