mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
@ -17,22 +18,24 @@ namespace Vulkan
|
||||
class VKShader final : public AbstractShader
|
||||
{
|
||||
public:
|
||||
VKShader(ShaderStage stage, std::vector<u32> spv, VkShaderModule mod);
|
||||
VKShader(std::vector<u32> spv, VkPipeline compute_pipeline);
|
||||
VKShader(ShaderStage stage, std::vector<u32> spv, VkShaderModule mod, std::string_view name);
|
||||
VKShader(std::vector<u32> spv, VkPipeline compute_pipeline, std::string_view name);
|
||||
~VKShader() override;
|
||||
|
||||
VkShaderModule GetShaderModule() const { return m_module; }
|
||||
VkPipeline GetComputePipeline() const { return m_compute_pipeline; }
|
||||
BinaryData GetBinary() const override;
|
||||
|
||||
static std::unique_ptr<VKShader> CreateFromSource(ShaderStage stage, std::string_view source);
|
||||
static std::unique_ptr<VKShader> CreateFromSource(ShaderStage stage, std::string_view source,
|
||||
std::string_view name);
|
||||
static std::unique_ptr<VKShader> CreateFromBinary(ShaderStage stage, const void* data,
|
||||
size_t length);
|
||||
size_t length, std::string_view name);
|
||||
|
||||
private:
|
||||
std::vector<u32> m_spv;
|
||||
VkShaderModule m_module;
|
||||
VkPipeline m_compute_pipeline;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
} // namespace Vulkan
|
||||
|
Reference in New Issue
Block a user