Merge shader branch, adding support for GLSL decompilation, a macro

interpreter, and a rewrite of the GPU code.
This commit is contained in:
gdkchan 2018-04-08 16:17:35 -03:00
parent 7acd0e0122
commit b9aa3966c0
77 changed files with 5301 additions and 766 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
namespace Ryujinx.Graphics.Gal
{
@ -21,10 +22,56 @@ namespace Ryujinx.Graphics.Gal
float OffsY,
float Rotate);
void SendVertexBuffer(int Index, byte[] Buffer, int Stride, GalVertexAttrib[] Attribs);
//Blend
void SetBlendEnable(bool Enable);
void SendR8G8B8A8Texture(int Index, byte[] Buffer, int Width, int Height);
void SetBlend(
GalBlendEquation Equation,
GalBlendFactor FuncSrc,
GalBlendFactor FuncDst);
void BindTexture(int Index);
void SetBlendSeparate(
GalBlendEquation EquationRgb,
GalBlendEquation EquationAlpha,
GalBlendFactor FuncSrcRgb,
GalBlendFactor FuncDstRgb,
GalBlendFactor FuncSrcAlpha,
GalBlendFactor FuncDstAlpha);
//Frame Buffer
void SetFb(int FbIndex, int Width, int Height);
void BindFrameBuffer(int FbIndex);
void DrawFrameBuffer(int FbIndex);
//Rasterizer
void ClearBuffers(int RtIndex, GalClearBufferFlags Flags);
void SetVertexArray(int VbIndex, int Stride, byte[] Buffer, GalVertexAttrib[] Attribs);
void SetIndexArray(byte[] Buffer, GalIndexFormat Format);
void DrawArrays(int VbIndex, GalPrimitiveType PrimType);
void DrawElements(int VbIndex, int First, GalPrimitiveType PrimType);
//Shader
void CreateShader(long Tag, GalShaderType Type, byte[] Data);
IEnumerable<ShaderDeclInfo> GetTextureUsage(long Tag);
void SetConstBuffer(long Tag, int Cbuf, byte[] Data);
void SetUniform1(string UniformName, int Value);
void BindShader(long Tag);
void BindProgram();
//Texture
void SetTexture(int Index, GalTexture Tex);
void SetSampler(int Index, GalTextureSampler Sampler);
}
}