Commit graph

37 commits

Author SHA1 Message Date
gdkchan
6a51b628f9
Fix error when dual source blend is used (#1610)
* Fix error when dual source blend is used

* Ensure framebuffer
2020-10-12 21:50:41 -03:00
gdkchan
1eea35554c
Better viewport flipping and depth mode detection method (#1556)
* Use a better viewport flipping approach

* New approach to detect depth mode

* nit: Sort method on the OpenGL backend

* Adjust spacing on comment

* Unswap near and far parameters based on ScaleZ
2020-09-19 19:46:49 -03:00
mageven
a33dc2f491
Improved Logger (#1292)
* Logger class changes only

Now compile-time checking is possible with the help of Nullable Value
types.

* Misc formatting

* Manual optimizations

PrintGuestLog
PrintGuestStackTrace
Surfaceflinger DequeueBuffer

* Reduce SendVibrationXX log level to Debug

* Add Notice log level

This level is always enabled and used to print system info, etc...
Also, rewrite LogColor to switch expression as colors are static

* Unify unhandled exception event handlers

* Print enabled LogLevels during init

* Re-add App Exit disposes in proper order

nit: switch case spacing

* Revert PrintGuestStackTrace to Info logs due to #1407

PrintGuestStackTrace is now called in some critical error handlers
so revert to old behavior as KThread isn't part of Guest.

* Batch replace Logger statements
2020-08-04 01:32:53 +02:00
gdkchan
43c13057da
Implement alpha test using legacy functions (#1426) 2020-07-28 18:30:08 -03:00
gdkchan
51fbc1fde4
Use polygon offset clamp if supported (#1429) 2020-07-26 18:11:28 -03:00
gdkchan
8dbcae1ff8
Implement BGRA texture support (#1418)
* Implement BGRA texture support

* Missing AppendLine

* Remove empty lines

* Address PR feedback
2020-07-26 00:03:40 -03:00
mageven
723ae240dc
GL: Implement more Point parameters (#1399)
* Fix GL_INVALID_VALUE on glPointSize calls

* Implement more of Point primitive state

* Use existing Origin enum
2020-07-20 21:59:13 -03:00
gdkchan
788ca6a411
Initial transform feedback support (#1370)
* Initial transform feedback support

* Some nits and fixes

* Update ReportCounterType and Write method

* Can't change shader or TFB bindings while TFB is active

* Fix geometry shader input names with new naming
2020-07-15 13:01:10 +10:00
riperiperi
f224769c49
Implement Logical Operation registers and functionality (#1380)
* Implement Logical Operation registers and functionality.

* Address Feedback 1
2020-07-10 14:23:15 -03:00
riperiperi
484eb645ae
Implement Zero-Configuration Resolution Scaling (#1365)
* Initial implementation of Render Target Scaling

Works with most games I have. No GUI option right now, it is hardcoded.

Missing handling for texelFetch operation.

* Realtime Configuration, refactoring.

* texelFetch scaling on fragment shader (WIP)

* Improve Shader-Side changes.

* Fix potential crash when no color/depth bound

* Workaround random uses of textures in compute.

This was blacklisting textures in a few games despite causing no bugs. Will eventually add full support so this doesn't break anything.

* Fix scales oscillating when changing between non-native scales.

* Scaled textures on compute, cleanup, lazier uniform update.

* Cleanup.

* Fix stupidity

* Address Thog Feedback.

* Cover most of GDK's feedback (two comments remain)

* Fix bad rename

* Move IsDepthStencil to FormatExtensions, add docs.

* Fix default config, square texture detection.

* Three final fixes:

- Nearest copy when texture is integer format.
- Texture2D -> Texture3D copy correctly blacklists the texture before trying an unscaled copy (caused driver error)
- Discount small textures.

* Remove scale threshold.

Not needed right now - we'll see if we run into problems.

* All CPU modification blacklists scale.

* Fix comment.
2020-07-07 04:41:07 +02:00
gdkchan
a15b951721
Fix wrong face culling once and for all (#1277)
* Viewport swizzle support on NV and clip origin

* Initialize default viewport swizzle state, emulate viewport swizzle on shaders when not supported

* Address PR feedback
2020-05-28 09:03:07 +10:00
riperiperi
5dab515c7a
Flush GL commands before inevitably waiting for a query result. (#1278) 2020-05-27 17:51:03 +10:00
riperiperi
d941f4c070
Remember bound framebuffer to avoid glGetInteger use. (#1273)
glGetInteger seems to sync with GPU which is less than ideal, and slowing down texture copies.
2020-05-24 15:44:12 +02:00
gdkchan
5011640b30
Spanify Graphics Abstraction Layer (#1226)
* Spanify Graphics Abstraction Layer

* Be explicit about BufferHandle size
2020-05-23 11:46:09 +02:00
riperiperi
cd48576f58
Implement Counter Queue and Partial Host Conditional Rendering (#1167)
* Implementation of query queue and host conditional rendering

* Resolve some comments.

* Use overloads instead of passing object.

* Wake the consumer threads when incrementing syncpoints.

Also, do a busy loop when awaiting the counter for a blocking flush, rather than potentially sleeping the thread.

* Ensure there's a command between begin and end query.
2020-05-04 12:24:59 +10:00
mageven
53369e79bd
Implement user-defined clipping on GL state pipeline (#1118) 2020-05-04 12:04:49 +10:00
riperiperi
c2ac45adc5
Fix depth clamp enable bit, unit scale for polygon offset. (#1178)
Verified with deko3d and opengl driver code.
2020-04-30 11:47:24 +10:00
gdkchan
3cb1fa0e85
Implement texture buffers (#1152)
* Implement texture buffers

* Throw NotSupportedException where appropriate
2020-04-25 23:02:18 +10:00
mageven
a728610b40
Implement Constant Color blends (#1119)
* Implement Constant Color blends and init blend states

* Address gdkchan's comments

Also adds Set methods to GpuState

* Fix descriptions of QueryModified
2020-04-25 23:00:43 +10:00
mageven
4960ab85f8
Implement Depth Clamping (#1120)
* Implement Depth Clamping and add misc enums

* Fix formatting
2020-04-17 11:16:49 +10:00
mageven
468d8f841f
Simple GPU fixes (#1093)
* Implement RasterizeEnable

* Match viewport count to hardware

* Simplify ScissorTest tracking around Blits

* Disable RasterizerDiscard around Blits and track its state

* Read RasterizeEnable reg as bool and add doc
2020-04-07 19:19:45 +10:00
gdkchan
b18ef8e3a0
Workaround for AMD and Intel view format bug (#1050)
* Workaround for Intel view format bug

* Dispose of the intermmediate texture aswell

* Apply workaround on AMD aswell
2020-03-29 23:48:39 +11:00
gdkchan
ab4867505e
Implement GPU scissors (#1058)
* Implement GPU scissors

* Remove unused using

* Add missing changes for Clear
2020-03-29 14:02:58 +11:00
gdkchan
f373f870f7
Support configurable point size (#916) 2020-02-02 10:19:46 +11:00
gdkchan
8b90924c1e Support instanced draw of quads" (#881) 2020-01-13 09:14:50 +11:00
gdkchan
2bb39ff03e Replace glFinish with barrier for WaitForIdle (#878) 2020-01-13 09:12:40 +11:00
gdkchan
18814d44b2 Address PR feedback
Add TODO comment for GL_EXT_polygon_offset_clamp
2020-01-09 02:13:00 +01:00
gdkchan
59fdaa744b GPU resource disposal 2020-01-09 02:13:00 +01:00
gdkchan
80ff2eab29 Change GPU errors to debug and reduce log messages 2020-01-09 02:13:00 +01:00
gdkchan
c5b9088914 Remove some error logging to avoid log spam 2020-01-09 02:13:00 +01:00
gdkchan
654e617fe7 Some code cleanup 2020-01-09 02:13:00 +01:00
gdkchan
af8498d679 Add basic error logging to the GPU 2020-01-09 02:13:00 +01:00
gdkchan
7ce5584f9e Support depth clip mode and disable shader fast math optimization on NVIDIA as a workaround for compiler bugs (?) 2020-01-09 02:13:00 +01:00
gdk
396768f3b4 Fix texture 0 not being bound for compute 2020-01-09 02:13:00 +01:00
gdk
d786d8d2b9 Support copy of slices to 3D textures, remove old 3D render target layered render support, do not delete textures with existing views created from them 2020-01-09 02:13:00 +01:00
gdk
8cba252b23 Add per-source type memory change tracking, simplified state change tracking, other fixes 2020-01-09 02:13:00 +01:00
gdk
1b7d955195 Initial support for image stores, support texture sample on compute 2020-01-09 02:13:00 +01:00
Renamed from Ryujinx.Graphics.OpenGL/GraphicsPipeline.cs (Browse further)