Debian Codegraph @

Source/Core/VideoCommon/PixelShaderManager.h

raw symbols SCIP
1 // Copyright 2008 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <span>
7
8 #include "Common/CommonTypes.h"
9 #include "VideoCommon/ConstantManager.h"
10
11 class PointerWrap;
12
13 // The non-API dependent parts.
14 class PixelShaderManager final
15 {
16 public:
17 void Init();
18 void Dirty();
19 void DoState(PointerWrap& p);
20
21 void SetConstants(); // sets pixel shader constants
22
23 // constant management
24 // Some of these functions grab the constant values from global state,
25 // so make sure to call them after memory is committed
26 void SetTevColor(int index, int component, s32 value);
27 void SetTevKonstColor(int index, int component, s32 value);
28 void SetTevOrder(int index, u32 order);
29 void SetTevKSel(int index, u32 ksel);
30 void SetTevCombiner(int index, int alpha, u32 combiner);
31 void SetAlpha();
32 void SetAlphaTestChanged();
33 void SetDestAlphaChanged();
34 void SetTexDims(int texmapid, u32 width, u32 height);
35 void SetSamplerState(int texmapid, u32 tm0, u32 tm1);
36 void SetZTextureBias();
37 void SetViewportChanged();
38 void SetEfbScaleChanged(float scalex, float scaley);
39 void SetZSlope(float dfdx, float dfdy, float f0);
40 void SetIndMatrixChanged(int matrixidx);
41 void SetTevIndirectChanged();
42 void SetZTextureTypeChanged();
43 void SetZTextureOpChanged();
44 void SetIndTexScaleChanged(bool high);
45 void SetTexCoordChanged(u8 texmapid);
46 void SetFogColorChanged();
47 void SetFogParamChanged();
48 void SetFogRangeAdjustChanged();
49 void SetGenModeChanged();
50 void SetZModeControl();
51 void SetBlendModeChanged();
52 void SetBoundingBoxActive(bool active);
53
54 PixelShaderConstants constants{};
55 bool dirty = false;
56
57 // Constants for custom shaders
58 std::span<u8> custom_constants;
59 bool custom_constants_dirty = false;
60
61 private:
62 bool m_fog_range_adjusted_changed = false;
63 bool m_viewport_changed = false;
64 bool m_indirect_dirty = false;
65 bool m_dest_alpha_dirty = false;
66 };