mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
VideoCommon/RenderBase: Use a std::string_view with CreateShaderFromSource()
Greatly simplifies the overall interface when it comes to compiling shaders. Also allows getting rid of a std::string overload of the same name. Now std::string and const char* both go through the same function.
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
@ -25,8 +26,7 @@ public:
|
||||
VkPipeline GetComputePipeline() const { return m_compute_pipeline; }
|
||||
BinaryData GetBinary() const override;
|
||||
|
||||
static std::unique_ptr<VKShader> CreateFromSource(ShaderStage stage, const char* source,
|
||||
size_t length);
|
||||
static std::unique_ptr<VKShader> CreateFromSource(ShaderStage stage, std::string_view source);
|
||||
static std::unique_ptr<VKShader> CreateFromBinary(ShaderStage stage, const void* data,
|
||||
size_t length);
|
||||
|
||||
|
Reference in New Issue
Block a user