Commit graph

183 commits

Author SHA1 Message Date
gdkchan
bd28ce90e6
Implement small indexed draws and other fixes to make guest Vulkan work (#1558) 2020-09-24 09:48:34 +10: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
991784868f
Fix shader regression on Intel iGPUs by reverting layout changes (#1425) 2020-07-29 08:01:11 +10:00
gdkchan
111534a74e
Remove GPU MemoryAccessor (#1423)
* Remove GPU MemoryAccessor

* Update outdated XML doc

* Update more outdated stuff
2020-07-25 16:39:45 +10: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
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
gdkchan
0b6d206daa
Omit image format if possible, and fix BA bit (#1280)
* Omit image format if possible, and fix BA bit

* Match extension name
2020-05-27 11:00:21 +02:00
gdkchan
b8eb6abecc
Refactor shader GPU state and memory access (#1203)
* Refactor shader GPU state and memory access

* Fix NVDEC project build

* Address PR feedback and add missing XML comments
2020-05-06 11:02:28 +10:00
gdkchan
3cb1fa0e85
Implement texture buffers (#1152)
* Implement texture buffers

* Throw NotSupportedException where appropriate
2020-04-25 23:02:18 +10:00
gdkchan
03711dd7b5
Implement SULD shader instruction (#1117)
* Implement SULD shader instruction

* Some nits
2020-04-22 09:35:28 +10:00
Cristallix
4738113f29
Suppress warnings from fields never used or never assigned (CS0169 and CS0649) (#919)
* chore : disable unwanted warnings and minor code cleanup

* chore : remove more warnings

* fix : reorder struct correctly

* fix : restore _isKernel and remove useless comment

* fix : copy/paste error

* fix : restore CallMethod call

* fix : whitespace

* chore : clean using

* feat : remove warnings

* fix : simplify warning removal on struct

* fix : revert fields deletion and code clean up

* fix : re-add RE value

* fix : typo
2020-04-21 07:59:59 +10:00
gdkchan
5b5239ab5b
Remove output interpolation qualifier (#1070) 2020-04-02 12:24:55 +11:00
riperiperi
a0e6647860
Compare shader code using a span instead of individual reads. (#917)
* Compare shader code using a span instead of individual reads.

* Add comment for new parameter.

* Remove unnecessary Math.Min
2020-02-03 20:11:22 +01:00
gdkchan
796e5d14b4
Use correct shader local memory size instead of a hardcoded size (#914)
* Use correct shader local size instead of a hardcoded size

* Remove unused uniform block

* Update XML doc

* Local memory size has 23 bits on maxwell

* Generate compute QMD struct from nv open doc header

* Remove dummy arrays when shared or local memory is not used, other improvements
2020-02-02 14:25:52 +11:00
gdkchan
b8e3909d80 Add a GetSpan method to the memory manager and use it on GPU (#877) 2020-01-13 10:27:50 +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
383452f5cf Fix some shader disposal issues 2020-01-09 02:13:00 +01:00
gdkchan
92703af555 Address PR feedback 2020-01-09 02:13:00 +01:00
gdkchan
9bfb373bdf Remove more unused code 2020-01-09 02:13:00 +01:00
gdkchan
59fdaa744b GPU resource disposal 2020-01-09 02:13:00 +01:00
gdkchan
430faeb8ef Add XML documentation to Ryujinx.Graphics.Gpu.Shader 2020-01-09 02:13:00 +01:00
gdkchan
654e617fe7 Some code cleanup 2020-01-09 02:13:00 +01:00
gdkchan
9d7a142a48 Support texture rectangle targets (non-normalized coords) 2020-01-09 02:13:00 +01:00
gdkchan
f2c85c5d58 Support non-constant texture offsets on non-NVIDIA gpus 2020-01-09 02:13:00 +01:00
gdkchan
3323a3a042 Use correct shared memory size (in words, not bytes) 2020-01-09 02:13:00 +01:00
gdkchan
66d91cbc6c Use dispatch params shared memory size when available 2020-01-09 02:13:00 +01:00
gdkchan
0d9672f3ae Use maximum shared memory size supported by hardware 2020-01-09 02:13:00 +01:00
gdkchan
cb171f6ebf Support shared color mask, implement more shader instructions
Support shared color masks (used by Nouveau and maybe the NVIDIA
driver).
Support draw buffers (also required by OpenGL).
Support viewport transform disable (disabled for now as it breaks some
games).
Fix instanced rendering draw being ignored for multi draw.
Fix IADD and IADD3 immediate shader encodings, that was not matching
some ops.
Implement FFMA32I shader instruction.
Implement IMAD shader instruction.
2020-01-09 02:13:00 +01:00
gdk
6a98c643ca Add a pass to turn global memory access into storage access, and do all storage related transformations on IR 2020-01-09 02:13:00 +01:00
gdk
65428f5842 Fix shader code comparison method 2020-01-09 02:13:00 +01:00
gdk
3ca675223a Remove TranslatorConfig struct 2020-01-09 02:13:00 +01:00
gdk
6e399061ce Invalidate shaders when they are modified 2020-01-09 02:13:00 +01:00