mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-01-10 00:39:25 +01:00
c8c2beaeff
* do not move constant variables * applet_manager: avoid possible use after move * use constant references where pointed out by msvc * extra_hid: initialize response * ValidateSaveState: passing slot separately is not necessary * common: mark HashCombine as nodiscard * cityhash: remove use of using namespace std * Prefix all size_t with std:: done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2` based on 7d8f115 * shared_memory.cpp: fix log error format * fix compiling with pch off
37 lines
993 B
C++
37 lines
993 B
C++
// Copyright 2015 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include "common/common_types.h"
|
|
|
|
namespace Pica {
|
|
|
|
struct ShaderSetup;
|
|
struct ShaderUnit;
|
|
|
|
class ShaderEngine {
|
|
public:
|
|
virtual ~ShaderEngine() = default;
|
|
|
|
/**
|
|
* Performs any shader unit setup that only needs to happen once per shader (as opposed to once
|
|
* per vertex, which would happen within the `Run` function).
|
|
*/
|
|
virtual void SetupBatch(ShaderSetup& setup, u32 entry_point) = 0;
|
|
|
|
/**
|
|
* Runs the currently setup shader.
|
|
*
|
|
* @param setup Shader engine state, must be setup with SetupBatch on each shader change.
|
|
* @param state Shader unit state, must be setup with input data before each shader invocation.
|
|
*/
|
|
virtual void Run(const ShaderSetup& setup, ShaderUnit& state) const = 0;
|
|
};
|
|
|
|
std::unique_ptr<ShaderEngine> CreateEngine(bool use_jit);
|
|
|
|
} // namespace Pica
|