Commit Graph

17 Commits

Author SHA1 Message Date
ReinUsesLisp
42dc925c3d Implement SSY/SYNC shader instructions (#382)
* Use a program counter to control shaders' flow

* Cleanup

* Implement SSY/SYNC

* Address feedback

* Fixup commentary

* Fixup Ssy instruction
2018-08-31 13:14:04 -03:00
ReinUsesLisp
a42ab2e40c Implement vertex instancing (#381) 2018-08-25 01:16:58 -03:00
ReinUsesLisp
624e813cd3 Implement multiple rendertarget attachments and depth writting (#375)
* Add depth writting

* Implement multiple attachments

* Address feedback
2018-08-23 02:07:23 -03:00
ReinUsesLisp
726de8c46a Rendertarget attachments, texture and image changes (#358)
* Add multiple color outputs for fragment shaders

* Add registers and gal enums

* Use textures for framebuffers and split color and zeta framebuffers

* Abstract texture and framebuffer targets as an image

* Share images between framebuffers and textures

* Unstub formats

* Add some formats

* Disable multiple attachments

* Cache framebuffer attachments

* Handle format types

* Add some rendertarget formats

* Code cleanup

* Fixup half float types

* Address feedback

* Disable multiple attachments in shaders

* Add A4B4G4R4 image format

* Add reversed section for image enums
2018-08-19 22:25:26 -03:00
ReinUsesLisp
6e1a6c5b2b Implement PointCoord and PointSize shader attributes (#353)
* Implement PointCoord and PointSize shader attributes

* Address feedback
2018-08-16 02:26:03 -03:00
gdkchan
09593ae6d8
Add partial support to the TEX.B shader instruction (#342)
* Add partial support to the TEX.B shader instruction, fix for mixed indexed and non-indexed drawing

* Better exception
2018-08-13 18:22:09 -03:00
ReinUsesLisp
25dd5f4238 Low level graphics API prerequisites (#319)
* Add GalPipelineState and IGalPipeline

* Separate UploadVertex call

* Add ConstBuffer cache

* Move Vertex Assembly into GalPipelineState

* Move Uniform binds to GalPipelineState

* Move framebuffer flip into a buffer

* Rebase

* Fix regression

* Move clear values from VertexEndGl to ClearBuffers

* Rename obscure names O->Old S->New
2018-08-10 01:09:40 -03:00
ReinUsesLisp
cd203e98f2 Implement Geometry shaders (#280)
* Implement Geometry shaders

* Add EmitVertex() and EndPrimitive()

* Read output geometry data from header

* Stub Vmad

* Add Iadd_I32

* Stub Mov_S (S2R)

* Stub Isberd

* Change vertex index to gpr39 in Abuf

* Add stub messages for consistency

* Do not print input block when there is no attributes

* Use GL_ARB_enhanced_layouts

* Skip geometry shaders when there's no GL_ARB_enhanced_layouts

* Address feedback

* Address feedback
2018-07-19 02:33:27 -03:00
ReinUsesLisp
9cbf908cf5 Add FaceAttr in GLSL, unmanaged case in EmitTex and ConstantColorG80 blend factor (#207)
* Add FaceAttr (0x3fc) input attribute in GLSL

* Implement unmanaged case in EmitTex

* Add ConstantColor for 0xC001 (G80) from PR #145
2018-07-03 20:06:13 -03:00
ReinUsesLisp
edfd4bc860 Explicit GLSL "position" attribute location (#199) 2018-06-28 22:01:58 -03:00
gdkchan
e6eeb6f09f
Add support for Vertex Program A and other small shader improvements (#192)
* Add WIP support for Vertex Program A, add the FADD_I32 shader instruction, small fix on FFMA_I encoding, nits

* Add separate subroutines for program A/B, and copy attributes to a temp

* Move finalization code to main

* Add new line after flip uniform on the shader

* Handle possible case where VPB uses an output attribute written by VPA but not available on the vbo

* Address PR feedback
2018-06-27 23:55:08 -03:00
gdkchan
e7559f128f
Small OpenGL Renderer refactoring (#177)
* Call OpenGL functions directly, remove the pfifo thread, some refactoring

* Fix PerformanceStatistics calculating the wrong host fps, remove wait event on PFIFO as this wasn't exactly was causing the freezes (may replace with an exception later)

* Organized the Gpu folder a bit more, renamed a few things, address PR feedback

* Make PerformanceStatistics thread safe

* Remove unused constant

* Use unlimited update rate for better pref
2018-06-23 21:39:25 -03:00
gdkchan
9176180abb Minor shader fixes 2018-06-12 09:26:49 -03:00
gdkchan
f43dd08064 Added support for more shader instructions and texture formats, fix swapped channels in RGB565 and RGBA5551? texture formats, allow zero values on blending registers, initial work to build CFG on the shader decoder, update the BRA instruction to work with it (WIP) 2018-05-29 20:37:10 -03:00
gdkchan
b19c474082 Added more shader instructions, including BFE, BRA (partial), FMNMX, ISCADD, SHL, LD_C, some shader related fixes, added support for texture component selection 2018-05-17 15:25:42 -03:00
gdkchan
feb2680a6c [GPU] Add more shader instructions, add support for rgb565 textures 2018-04-10 16:50:32 -03:00
gdkchan
b9aa3966c0 Merge shader branch, adding support for GLSL decompilation, a macro
interpreter, and a rewrite of the GPU code.
2018-04-08 16:41:38 -03:00