mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
D3DCommon/Shader: Use std::optional with CompileShader()
Allows removing the use of an out parameter, making it nicer to use.
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
#include "VideoBackends/D3DCommon/Common.h"
|
||||
#include "VideoCommon/AbstractShader.h"
|
||||
@ -19,8 +20,8 @@ public:
|
||||
|
||||
BinaryData GetBinary() const override;
|
||||
|
||||
static bool CompileShader(D3D_FEATURE_LEVEL feature_level, BinaryData* out_bytecode,
|
||||
ShaderStage stage, std::string_view source);
|
||||
static std::optional<BinaryData> CompileShader(D3D_FEATURE_LEVEL feature_level, ShaderStage stage,
|
||||
std::string_view source);
|
||||
|
||||
static BinaryData CreateByteCode(const void* data, size_t length);
|
||||
|
||||
|
Reference in New Issue
Block a user