1 // Copyright (c) 2012- PPSSPP Project. 2 3 // This program is free software: you can redistribute it and/or modify 4 // it under the terms of the GNU General Public License as published by 5 // the Free Software Foundation, version 2.0 or later versions. 6 7 // This program is distributed in the hope that it will be useful, 8 // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 // GNU General Public License 2.0 for more details. 11 12 // A copy of the GPL 2.0 should have been included with the program. 13 // If not, see http://www.gnu.org/licenses/ 14 15 // Official git repository and contact information can be found at 16 // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. 17 18 #pragma once 19 20 #include <cstdint> 21 22 #include "Common/CommonTypes.h" 23 #include "Common/GPU/Shader.h" 24 #include "Common/GPU/thin3d.h" 25 26 struct VShaderID; 27 28 bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguageDesc &compat, const Draw::Bugs bugs, uint32_t *attrMask, uint64_t *uniformMask, std::string *errorString); 29 30 // D3D9 constants. 31 enum { 32 CONST_VS_PROJ = 0, 33 CONST_VS_PROJ_THROUGH = 4, 34 CONST_VS_VIEW = 8, 35 CONST_VS_WORLD = 11, 36 CONST_VS_TEXMTX = 14, 37 CONST_VS_UVSCALEOFFSET = 17, 38 CONST_VS_FOGCOEF = 18, 39 CONST_VS_AMBIENT = 19, 40 CONST_VS_MATAMBIENTALPHA = 20, 41 CONST_VS_MATDIFFUSE = 21, 42 CONST_VS_MATSPECULAR = 22, 43 CONST_VS_MATEMISSIVE = 23, 44 CONST_VS_LIGHTPOS = 24, 45 CONST_VS_LIGHTDIR = 28, 46 CONST_VS_LIGHTATT = 32, 47 CONST_VS_LIGHTANGLE_SPOTCOEF = 36, 48 CONST_VS_LIGHTDIFFUSE = 40, 49 CONST_VS_LIGHTSPECULAR = 44, 50 CONST_VS_LIGHTAMBIENT = 48, 51 CONST_VS_DEPTHRANGE = 52, 52 CONST_VS_BONE0 = 53, 53 CONST_VS_BONE1 = 56, 54 CONST_VS_BONE2 = 59, 55 CONST_VS_BONE3 = 62, 56 CONST_VS_BONE4 = 65, 57 CONST_VS_BONE5 = 68, 58 CONST_VS_BONE6 = 71, 59 CONST_VS_BONE7 = 74, 60 CONST_VS_BONE8 = 77, 61 CONST_VS_CULLRANGEMIN = 80, 62 CONST_VS_CULLRANGEMAX = 81, 63 }; 64