some video buffer work
This commit is contained in:
parent
12382ddac4
commit
f469296b78
|
@ -53,7 +53,7 @@ add_executable(shadps4
|
|||
src/Core/PS4/HLE/Kernel/event_queues.h
|
||||
src/Core/PS4/HLE/Kernel/cpu_management.cpp
|
||||
src/Core/PS4/HLE/Kernel/cpu_management.h
|
||||
"src/Util/Singleton.h" "src/Util/Disassembler.cpp" "src/Util/Disassembler.h" "src/Core/PS4/Util/aerolib.h" "src/Core/PS4/Loader/SymbolsResolver.h" "src/Core/PS4/Loader/SymbolsResolver.cpp" "src/Core/PS4/HLE/Libs.cpp" "src/Core/PS4/HLE/Libs.h" "src/Core/PS4/HLE/LibC.cpp" "src/Core/PS4/HLE/LibC.h" "src/Lib/Timer.cpp" "src/Lib/Timer.h" "src/Core/PS4/HLE/LibKernel.cpp" "src/Core/PS4/HLE/LibKernel.h" "src/Core/PS4/HLE/LibSceGnmDriver.cpp" "src/Core/PS4/HLE/LibSceGnmDriver.h" "src/Core/PS4/HLE/Kernel/ThreadManagement.cpp" "src/Core/PS4/HLE/Kernel/ThreadManagement.h" "src/Core/PS4/HLE/ErrorCodes.h" "src/debug.h" "src/Core/PS4/HLE/Kernel/memory_management.cpp" "src/Core/PS4/HLE/Kernel/memory_management.h" "src/Core/PS4/GPU/gpu_memory.cpp" "src/Core/PS4/GPU/gpu_memory.h" "src/emulator.cpp" "src/emulator.h" "src/Core/PS4/HLE/Kernel/Objects/event_queue.h" "src/Core/PS4/HLE/Kernel/Objects/event_queue.cpp" "src/Core/PS4/HLE/Graphics/Objects/video_out_ctx.cpp" "src/Core/PS4/HLE/Graphics/Objects/video_out_ctx.h" "src/Core/PS4/HLE/Graphics/graphics_ctx.h" "src/vulkan_util.cpp" "src/vulkan_util.h")
|
||||
"src/Util/Singleton.h" "src/Util/Disassembler.cpp" "src/Util/Disassembler.h" "src/Core/PS4/Util/aerolib.h" "src/Core/PS4/Loader/SymbolsResolver.h" "src/Core/PS4/Loader/SymbolsResolver.cpp" "src/Core/PS4/HLE/Libs.cpp" "src/Core/PS4/HLE/Libs.h" "src/Core/PS4/HLE/LibC.cpp" "src/Core/PS4/HLE/LibC.h" "src/Lib/Timer.cpp" "src/Lib/Timer.h" "src/Core/PS4/HLE/LibKernel.cpp" "src/Core/PS4/HLE/LibKernel.h" "src/Core/PS4/HLE/LibSceGnmDriver.cpp" "src/Core/PS4/HLE/LibSceGnmDriver.h" "src/Core/PS4/HLE/Kernel/ThreadManagement.cpp" "src/Core/PS4/HLE/Kernel/ThreadManagement.h" "src/Core/PS4/HLE/ErrorCodes.h" "src/debug.h" "src/Core/PS4/HLE/Kernel/memory_management.cpp" "src/Core/PS4/HLE/Kernel/memory_management.h" "src/Core/PS4/GPU/gpu_memory.cpp" "src/Core/PS4/GPU/gpu_memory.h" "src/emulator.cpp" "src/emulator.h" "src/Core/PS4/HLE/Kernel/Objects/event_queue.h" "src/Core/PS4/HLE/Kernel/Objects/event_queue.cpp" "src/Core/PS4/HLE/Graphics/Objects/video_out_ctx.cpp" "src/Core/PS4/HLE/Graphics/Objects/video_out_ctx.h" "src/Core/PS4/HLE/Graphics/graphics_ctx.h" "src/vulkan_util.cpp" "src/vulkan_util.h" "src/Core/PS4/GPU/video_out_buffer.cpp" "src/Core/PS4/GPU/video_out_buffer.h")
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
target_link_libraries(shadps4 PUBLIC fmt mincore spdlog IMGUI SDL3-shared ${OPENGL_LIBRARY} vulkan-1 spirv-tools-opt spirv-tools)
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
|
||||
namespace GPU {
|
||||
enum class MemoryMode : u32 { NoAccess = 0, Read = 1, Write = 2, ReadWrite = 3 };
|
||||
|
||||
enum class MemoryObjectType : u64 { InvalidObj, VideoOutBufferObj };
|
||||
void MemorySetAllocArea(u64 virtual_addr, u64 size);
|
||||
}
|
||||
} // namespace GPU
|
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <types.h>
|
||||
|
||||
namespace GPU {
|
||||
|
||||
enum class VideoOutBufferFormat : u64 {
|
||||
Unknown,
|
||||
R8G8B8A8Srgb,
|
||||
B8G8R8A8Srgb,
|
||||
};
|
||||
}
|
|
@ -17,6 +17,7 @@ struct VideoConfigInternal {
|
|||
std::vector<HLE::Libs::LibKernel::EventQueues::SceKernelEqueue> m_flip_evtEq;
|
||||
int m_flip_rate = 0;
|
||||
|
||||
std::vector<VideoOutBufferSetInternal> buffers_sets;
|
||||
int buffers_registration_index = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -165,6 +165,17 @@ s32 PS4_SYSV_ABI sceVideoOutRegisterBuffers(s32 handle, s32 startIndex, void* co
|
|||
u64 buffer_size = 1280 * 720 * 4; //TODO hardcoded value should be redone
|
||||
u64 buffer_pitch = attribute->pitchInPixel;
|
||||
|
||||
VideoOutBufferSetInternal buf{};
|
||||
|
||||
buf.start_index = startIndex;
|
||||
buf.num = bufferNum;
|
||||
buf.set_id = registration_index;
|
||||
buf.attr = *attribute;
|
||||
|
||||
ctx->buffers_sets.push_back(buf);
|
||||
|
||||
|
||||
|
||||
return registration_index;
|
||||
}
|
||||
s32 PS4_SYSV_ABI sceVideoOutSetFlipRate(s32 handle, s32 rate) {
|
||||
|
|
|
@ -87,6 +87,13 @@ struct SceVideoOutVblankStatus {
|
|||
u08 pad1[7] = {};
|
||||
};
|
||||
|
||||
struct VideoOutBufferSetInternal {
|
||||
SceVideoOutBufferAttribute attr;
|
||||
int start_index = 0;
|
||||
int num = 0;
|
||||
int set_id = 0;
|
||||
};
|
||||
|
||||
void videoOutInit(u32 width, u32 height);
|
||||
std::string getPixelFormatString(s32 format);
|
||||
void videoOutRegisterLib(SymbolsResolver* sym);
|
||||
|
|
Loading…
Reference in New Issue