mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -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:
@ -3,7 +3,8 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
#include <memory>
|
||||
|
||||
#include <string_view>
|
||||
#include "VideoBackends/D3DCommon/Common.h"
|
||||
#include "VideoCommon/AbstractShader.h"
|
||||
|
||||
@ -19,7 +20,7 @@ public:
|
||||
BinaryData GetBinary() const override;
|
||||
|
||||
static bool CompileShader(D3D_FEATURE_LEVEL feature_level, BinaryData* out_bytecode,
|
||||
ShaderStage stage, const char* source, size_t length);
|
||||
ShaderStage stage, std::string_view source);
|
||||
|
||||
static BinaryData CreateByteCode(const void* data, size_t length);
|
||||
|
||||
|
Reference in New Issue
Block a user