Commit Graph

4450 Commits

Author SHA1 Message Date
Andrew Church
041300ea1f opengl: Disable color buffers which are masked off at draw time.
This prevents such buffers from cropping the draw operation if they are
smaller than the base color buffer.
2016-07-16 05:37:56 +09:00
Andrew Church
dd71cb7160 opengl: Return correct data type for R11G11B10 formats. 2016-07-16 05:34:49 +09:00
James Benton
fed895b591 gx2: Fix GX2GetAttribFormatBits.
Sorry Nintendo I lied, I missed the slwi instruction.
2016-07-15 21:11:01 +01:00
James Benton
8cab03cf95 gx2: Cleanup gx2_format.h
Most of these were internal functions, this moves them to the appropriate
internal:: namespace where they belong!
2016-07-15 21:06:15 +01:00
Brett Lawson
d365122d7d Actually validate SCALED number formatComp and degamma. 2016-07-14 23:05:07 -07:00
Brett Lawson
50c82a188b Implement latte::NUMBER_FLOAT type for color buffers. 2016-07-14 23:05:00 -07:00
James Benton
215d0b3320 gx2: Fix GX2InitColorBufferRegs not setting NUMBER_TYPE. 2016-07-15 20:46:19 +01:00
James Benton
18c432ab4a opengl: Fix signed int color buffer type being unsigned. 2016-07-15 20:37:34 +01:00
Brett Lawson
1f6a67951a Fix latte::FMT_16_FLOAT mapping to incorrect GL constant. 2016-07-14 22:30:53 -07:00
Brett Lawson
8d6fb5c6cd Implement FMT_10_10_10_2, FMT_2_10_10_10 in stridedMemcpy. 2016-07-14 22:23:27 -07:00
Brett Lawson
9df5e86856 Assert instead of logging when stridedMemcpy fails on a format. 2016-07-14 22:16:24 -07:00
Brett Lawson
b46f2b8dca Dump shaders from GPU side.
This is neccessary to dump shaders which are prebuilt with
the applications and don't use standard GX2 calls.
2016-07-15 04:04:09 -07:00
Brett Lawson
b77bd27a98 Include fetch shader dumping now that its working. 2016-07-15 04:04:09 -07:00
Brett Lawson
fc07e13a5d Store the fetch shader disassembly with the shader.
This helps when debugging shader issues.  Vertex and Pixel
shaders already store this information, but fetch shaders
did not as they could not be disassembled.
2016-07-15 04:04:09 -07:00
Brett Lawson
93e2dd31ee Implement the disassembly of VTX instructions.
This is neccessary to enable disassembly of Fetch Shaders.
2016-07-15 04:04:09 -07:00
Brett Lawson
ab206327fb Properly handle the disassembly of subroutine shader data. 2016-07-15 04:04:09 -07:00
Brett Lawson
51fea98a55 GLSL implement SET_CUBEMAP_INDEX to do nothing.
This should actually still give us correct behaviour. However,
as the comment indicates, we may actually need to do some math
magics to make this behave correctly.
2016-07-15 04:04:08 -07:00
Brett Lawson
5205c2a749 Implement missing texture format types.
Someone got lazy and forgot to finish the switch statement
halfway through...
2016-07-15 04:04:08 -07:00
Brett Lawson
24d28b6d26 Use the correct resource offsets for fetch shaders. 2016-07-15 04:04:08 -07:00
Brett Lawson
64b50f3448 Indicate the correct number of fetches for fetch shaders. 2016-07-15 04:04:08 -07:00
Brett Lawson
04afd849c1 Keep track of the PPC memory bounds for shader resources. 2016-07-15 04:04:08 -07:00
Brett Lawson
c14a94ec8a Reformat disassembleTexInstruction.
It's old structure had an unneccesary else block.
2016-07-15 04:04:08 -07:00
James Benton
1a9b8d27a9 decaf-sdl: Fix assert hit by rounding in calculateScreenViewports.
Expression: roundf(tv[1] + tv[3]) <= windowHeight
2016-07-15 12:03:00 +01:00
James
77a89eee7b Merge pull request #184 from achurch/gl-clear-fbos
opengl: Use separate framebuffer objects for clear operations.
2016-07-15 11:03:01 +01:00
James
dc4f03c051 Merge pull request #182 from achurch/screen-size-fix
decaf-sdl: Fix emulated screens not fitting inside the window.
2016-07-15 11:01:24 +01:00
Andrew Church
c5a411298e decaf-sdl: Antialias scan buffers when drawing them to the window. 2016-07-15 18:07:00 +09:00
Andrew Church
056961b463 opengl: Use separate framebuffer objects for clear operations.
If the current framebuffer has multiple buffers bound to it, all
operations (including clear) will be confined to the area of the
smallest buffer.  Using separate framebuffer objects avoids this
happening, and it also saves the overhead of restoring the buffer
that was originally bound.
2016-07-15 17:34:02 +09:00
Andrew Church
e46b63e3c9 decaf-sdl: Fix emulated screens not fitting inside the window. 2016-07-15 17:12:12 +09:00
Brett Lawson
2dca41dcf7 glsl: Implement the SAMPLE_L TEX instruction (textureLod). 2016-07-14 17:09:03 -07:00
Brett Lawson
a65eed9740 glsl: Implement TEX SAMPLE extras with a more generic approach. 2016-07-14 17:09:03 -07:00
Brett Lawson
06abcff4d5 Fix LOD TEX SAMPLE's to use the right registers for LOD. 2016-07-14 18:04:49 -07:00
Brett Lawson
cbde4091dd Enable our AX thread, many games require this to function. 2016-07-14 18:04:42 -07:00
Brett Lawson
6d069dde30 Make sure to check interrupts even when busy looping in kernel. 2016-07-14 18:04:30 -07:00
Brett Lawson
f91df6cffb Do not resume multiple times when breakpoints are set. 2016-07-14 04:08:27 -07:00
Brett Lawson
d9623a2735 Debugger should default to the core which hit the breakpoint. 2016-07-14 03:56:04 -07:00
Brett Lawson
719afc486c Warn if the user tries to call memset with an invalid value. 2016-07-14 03:10:49 -07:00
Brett Lawson
eb18b91efc resumeThread should only reschedule when the thread is resumed. 2016-07-14 02:45:49 -07:00
Brett Lawson
e3395972a2 Make sure a thread is active before its resumed. 2016-07-14 02:45:44 -07:00
Brett Lawson
4ac8c10924 opengl: Move register writes to the end of an ALU group.
This is required to avoid incorrect results when a register is both
read and written by the same ALU instruction group.  Note that this
fix does not clean up CUBE which has its own write protections.
2016-07-14 02:23:26 -07:00
James Benton
ac0ca6bb31 Revert "opengl: Separate shader PV/PS updates from register writes."
This reverts commit f67d9c85af.

Broken, will fix then commit again.
2016-07-14 20:30:44 +01:00
Andrew Church
bfc9c10478 debugger: Indicate the current thread in the thread list. 2016-07-14 12:17:17 -07:00
James
5c8d8e9147 Merge pull request #179 from achurch/cube-non-xyz
opengl: Handle CUBE instructions with more varied operands.
2016-07-14 20:16:19 +01:00
Brett Lawson
c5840adae6 Added stack view window to debugger.
Note that this stack view window also marks out the stack
frames so that you can effectively follow the call chain.
2016-07-14 11:57:34 -07:00
Andrew Church
a643421c09 opengl: Handle CUBE instructions with more varied operands.
Fixes #177.
2016-07-15 03:18:11 +09:00
Andrew Church
f67d9c85af opengl: Separate shader PV/PS updates from register writes.
This is required to avoid incorrect results when a register is both
read and written by the same ALU instruction group.
2016-07-14 18:14:46 +01:00
James Benton
4bc0669979 Add whitespace to make the code more verbose.
heheheuheuheheh
2016-07-14 18:14:46 +01:00
Andrew Church
c5e996f6da coreinit: Add OSInitCoroutine and OSSwitchCoroutine.
(04c7504 + e4379ee + ad8f744)
2016-07-14 10:10:05 -07:00
Brett Lawson
132b736170 Do not crash when using getThreadCoreRegs while game running. 2016-07-14 01:33:34 -07:00
Brett Lawson
2d142a7b66 MEMAdjustExpHeap should return be aligning memory.
This is a temporary fix until we finish reversing the
heap functions properly.
2016-07-14 03:24:27 -07:00
Brett Lawson
a4c211ce9b Handle isData parameter of OSDynLoad_FindExport. 2016-07-14 03:24:27 -07:00