mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 19:36:55 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#ifndef EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_SHADERRESOURCEBARRIER_H_
|
||||
#define EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_SHADERRESOURCEBARRIER_H_
|
||||
|
||||
#include "graphics/host_gpu/graphicContext.h"
|
||||
#include "graphics/shader/recompiler/ResourceMaterialization.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace Libs::Graphics {
|
||||
|
||||
struct ShaderAddressWriteRange;
|
||||
struct ShaderStageRuntime;
|
||||
|
||||
struct ShaderBufferWriteRange {
|
||||
uint64_t address = 0;
|
||||
uint64_t size = 0;
|
||||
|
||||
bool operator==(const ShaderBufferWriteRange& other) const = default;
|
||||
};
|
||||
|
||||
VkPipelineStageFlags ShaderPipelineStages(VkShaderStageFlags stages);
|
||||
VkMemoryBarrier MakeShaderWriteDependency();
|
||||
VkImageMemoryBarrier MakeStorageImageDependency(const VulkanImage& image, bool read, bool written);
|
||||
VkBufferMemoryBarrier MakeGdsDependency(const VulkanBuffer& buffer);
|
||||
std::vector<ShaderBufferWriteRange>
|
||||
CollectShaderBufferWrites(const ShaderRecompiler::IR::Program& program,
|
||||
const ShaderRecompiler::IR::ResourceSnapshot& resources);
|
||||
bool MarkShaderAddressWrites(const std::vector<ShaderAddressWriteRange>& writes);
|
||||
bool HasShaderBufferWrites(const ShaderStageRuntime& runtime);
|
||||
void ShaderWriteBarrier(VkCommandBuffer vk_buffer, VkPipelineStageFlags source_stages);
|
||||
|
||||
} // namespace Libs::Graphics
|
||||
|
||||
#endif // EMULATOR_SRC_GRAPHICS_HOST_GPU_RENDERER_SHADERRESOURCEBARRIER_H_
|
||||
Reference in New Issue
Block a user