| 1 |
|
| 2 |
|
| 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 |
|
| 14 |
class PixelShaderManager final |
| 15 |
{ |
| 16 |
public: |
| 17 |
void Init(); |
| 18 |
void Dirty(); |
| 19 |
void DoState(PointerWrap& p); |
| 20 |
|
| 21 |
void SetConstants(); |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 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 |
|
| 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 |
}; |