CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/GPU/Common/FragmentShaderGenerator.h
Views: 1401
// Copyright (c) 2012- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include "Common/Common.h"20#include "Common/GPU/Shader.h"21#include "Common/GPU/thin3d.h"2223struct FShaderID;2425// D3D9 float constants2627#define CONST_PS_TEXENV 028#define CONST_PS_ALPHACOLORREF 129#define CONST_PS_ALPHACOLORMASK 230#define CONST_PS_FOGCOLOR 331#define CONST_PS_STENCILREPLACE 432#define CONST_PS_BLENDFIXA 533#define CONST_PS_BLENDFIXB 634#define CONST_PS_FBOTEXSIZE 735#define CONST_PS_TEXCLAMP 836#define CONST_PS_TEXCLAMPOFF 937#define CONST_PS_MIPBIAS 1038#define CONST_PS_TEX_NO_ALPHA_MUL 113940// For stencil upload41#define BCONST_PS_STENCILVALUE 134243// D3D9 bool constants, they have their own register space.444546// Can technically be deduced from the fragment shader ID, but this is safer.47enum class FragmentShaderFlags : u32 {48USES_DISCARD = 2,49USES_FLAT_SHADING = 4,50};51ENUM_CLASS_BITOPS(FragmentShaderFlags);5253bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLanguageDesc &compat, Draw::Bugs bugs, uint64_t *uniformMask, FragmentShaderFlags *fragmentShaderFlags, std::string *errorString);545556