mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
ShaderGen: Implement pixel ubershaders
This commit is contained in:
24
Source/Core/VideoCommon/UberShaderCommon.h
Normal file
24
Source/Core/VideoCommon/UberShaderCommon.h
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VideoCommon/ShaderGenCommon.h"
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
|
||||
namespace UberShader
|
||||
{
|
||||
// Common functions across all ubershaders
|
||||
void WriteUberShaderCommonHeader(ShaderCode& out, APIType api_type,
|
||||
const ShaderHostConfig& host_config);
|
||||
|
||||
// bitfieldExtract generator for BitField types
|
||||
template <typename T>
|
||||
std::string BitfieldExtract(const std::string& source, T type)
|
||||
{
|
||||
return StringFromFormat("bitfieldExtract(%s, %u, %u)", source.c_str(),
|
||||
static_cast<u32>(type.StartBit()), static_cast<u32>(type.NumBits()));
|
||||
}
|
||||
|
||||
} // namespace UberShader
|
Reference in New Issue
Block a user