mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-08 11:43:14 +00:00
videoout: register buffers in texture cache at VO creation time
This commit is contained in:
parent
bdb235716a
commit
e6f773f950
4 changed files with 18 additions and 18 deletions
|
@ -192,19 +192,6 @@ bool RendererVulkan::ShowSplash(Frame* frame /*= nullptr*/) {
|
|||
return true;
|
||||
}
|
||||
|
||||
Frame* RendererVulkan::PrepareFrame(const Libraries::VideoOut::BufferAttributeGroup& attribute,
|
||||
VAddr cpu_address) {
|
||||
// Request presentation image from the texture cache.
|
||||
const auto info = VideoCore::ImageInfo{attribute};
|
||||
auto& image = texture_cache.FindImage(info, cpu_address);
|
||||
return PrepareFrameInternal(image);
|
||||
}
|
||||
|
||||
Frame* RendererVulkan::PrepareBlankFrame() {
|
||||
auto& image = texture_cache.GetImage(VideoCore::NULL_IMAGE_ID);
|
||||
return PrepareFrameInternal(image);
|
||||
}
|
||||
|
||||
Frame* RendererVulkan::PrepareFrameInternal(VideoCore::Image& image) {
|
||||
// Request a free presentation frame.
|
||||
Frame* frame = GetRenderFrame();
|
||||
|
|
|
@ -38,8 +38,21 @@ public:
|
|||
~RendererVulkan();
|
||||
|
||||
Frame* PrepareFrame(const Libraries::VideoOut::BufferAttributeGroup& attribute,
|
||||
VAddr cpu_address);
|
||||
Frame* PrepareBlankFrame();
|
||||
VAddr cpu_address) {
|
||||
auto& image = RegisterVideoOutSurface(attribute, cpu_address);
|
||||
return PrepareFrameInternal(image);
|
||||
}
|
||||
|
||||
Frame* PrepareBlankFrame() {
|
||||
auto& image = texture_cache.GetImage(VideoCore::NULL_IMAGE_ID);
|
||||
return PrepareFrameInternal(image);
|
||||
}
|
||||
|
||||
VideoCore::Image& RegisterVideoOutSurface(
|
||||
const Libraries::VideoOut::BufferAttributeGroup& attribute, VAddr cpu_address) {
|
||||
const auto info = VideoCore::ImageInfo{attribute};
|
||||
return texture_cache.FindImage(info, cpu_address);
|
||||
}
|
||||
|
||||
bool ShowSplash(Frame* frame = nullptr);
|
||||
void Present(Frame* frame);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue