Commit graph

8344 commits

Author SHA1 Message Date
Tony Wasserka
fdad95c055 PixelShaderGen: Cleanups and fixes for tev combiners.
Fixes issue 4674.
2014-03-26 00:17:03 +01:00
Tony Wasserka
16105db709 BPMemory: Make use of BitField in a number of structures. 2014-03-25 23:57:58 +01:00
Tony Wasserka
8941f19cdb BPMemory: Expose the pixel_format and zformat fields in PE_CONTROL as enumerations. 2014-03-25 23:57:58 +01:00
Tony Wasserka
77a7bab5ae BPMemory: Use the new BitField class in two selected structures. 2014-03-25 23:57:57 +01:00
Tony Wasserka
48a1790d81 Common: Add a generic class for accessing bitfields in a fast and endianness-independent way.
The underlying storage type of a bitfield can be any intrinsic integer type,
but also any enumeration.

Custom storage types are supported if the following things are defined on the storage type:
- casting 0 to the storage type
- bit shift operators (in both directions)
- bitwise & operator
- bitwise ~ operator
- std::make_unsigned specialization
2014-03-25 23:33:04 +01:00
magumagu
03292eabc2 Fix OpArg::WriteRex with 8-bit memory operand.
Previously he function was misbehaving because of a missing check for
whether an 8-bit operand was a register operand; it would therefore
emit unnecessary REX prefixes, incorrectly assert on 32-bit targets, and
could potentially emit wrong code in rare cases (like a memory to register
operation involving AH.)

Also, some cleanup while I was in the area to make the function easier to
read.
2014-03-25 14:09:15 -07:00
Matthew Parlane
6351f28ab4 Merge pull request #200 from lioncash/unused-param
Remove an unused parameter from UpdateDebugger_MapLoaded.
2014-03-25 09:20:23 +13:00
Pierre Bourdon
c929c3ebc1 Merge pull request #202 from Tilka/mathutil
MathUtil: add IntFloat/IntDouble constructors and test FlushToZero()
2014-03-24 21:20:09 +01:00
Tillmann Karras
af525266d4 MathUtil: add constructors to IntFloat/IntDouble 2014-03-24 16:14:22 +01:00
Tony Wasserka
4aba433296 Merge pull request #201 from Sonicadvance1/Revert-PR179
Revert "Remove an unnecessary wx translation underscore macro from PHackSettings."
2014-03-24 09:50:38 +01:00
Ryan Houdek
5310d6d2ea Fix a crash that got recently introduced.
When CFileSystemGCWii::GetFileName can't find a valid filename it would return nullptr.
nullptr as a std::string throws an assert within the std lib.
So return an empty string and check if it is empty or not
2014-03-23 22:29:30 -05:00
Ryan Houdek
479695d068 Revert "Remove an unnecessary wx translation underscore macro from PHackSettings."
This reverts commit 110f603cb6.
2014-03-23 20:28:19 -05:00
Lioncash
59eb59dd98 Remove an unused parameter from UpdateDebugger_MapLoaded. 2014-03-23 17:19:12 -04:00
Ryan Houdek
a3e18cd498 Merge pull request #171 from lioncash/rarc-cleanup
File tree building cleanup
2014-03-23 00:34:26 -05:00
Matthew Parlane
b8f469dedd Merge pull request #195 from Sonicadvance1/RuntimeExtendedInfo
Allow the user to enable the extended information string like the old days.
2014-03-23 18:32:37 +13:00
Matthew Parlane
36eb806e4a Merge pull request #192 from lioncash/final
Mark the PPCDebugInterface and DSPDebugInterface as final.
2014-03-23 18:32:11 +13:00
Ryan Houdek
4c1cb65e1e Merge pull request #179 from lioncash/phack-cleanup
Remove an unnecessary wx translation underscore macro from PHackSettings.
2014-03-23 00:29:52 -05:00
Ryan Houdek
5dabe598a4 Merge pull request #180 from lioncash/log-window-cleanup
Small log queue clearing simplification.
2014-03-23 00:29:08 -05:00
Ryan Houdek
7549ee232c Allow the user to enable the extended information string like the old days.
This string shows emulated CPU speed, including true mhz + idle skipping mhz
2014-03-22 23:32:07 -05:00
Ryan Houdek
89efec6109 Merge pull request #167 from neobrain/ogl-efbpokes
Implement EFB pokes in the OpenGL backend.
2014-03-20 15:25:56 -05:00
Lioncash
9ed562d7de Mark the PPCDebugInterface and DSPDebugInterface as final. 2014-03-18 20:42:08 -04:00
Jens Nyberg
ae260e55e4 OGL/VertexManager: Do not check if g_nativeVertexFmt is zero
The variable is already dereferenced both before and after this
check which means that if this variable would ever be zero it would
have crashed dolphin already.
2014-03-18 21:33:30 +01:00
Jens Nyberg
80421156b6 OGL/VertexManager: Minor cleanup of if case 2014-03-18 21:33:30 +01:00
Pierre Bourdon
c11aadee41 Merge pull request #182 from RachelBryk/extract-gc-dol
Add extract dol/apploader options back for gc disks.
2014-03-18 20:41:35 +01:00
lioncash
aecc8ea666 Remove usesMixer function from the sound streams.
This isn't used anywhere in the codebase. Not even the base SoundStream has it as part of its interface.
2014-03-18 10:42:07 -04:00
lioncash
5e5ab61d0c Mark the audio streams as final.
These aren't intended to be continually extended.
2014-03-18 10:37:45 -04:00
Jens Nyberg
4a68550d01 Remove superfluous bit shift 2014-03-18 04:07:45 +01:00
Ryan Houdek
484fb46390 Clang 3.4 exposes some warnings on Android.
Fixes all warnings on Android build except for what is in externals.
Removes a function from TextureDecoder_Generic since it is unused and generates a warning.
2014-03-17 18:17:12 -05:00
Ryan Houdek
3586ab1d4c Fix the Android build when using clang 3.4 2014-03-17 17:56:22 -05:00
Rachel Bryk
57f3e1c907 Add extract dol/apploader options back for gc disks.
It was removed from the menu for the disk item in 868c6278, but we want to keep it there for gc games, since they don't have separate partitions.
2014-03-17 03:10:17 -04:00
Matthew Parlane
6445e02d53 Merge pull request #159 from Tilka/misc
Cleanup stuff
2014-03-17 17:43:20 +13:00
Tillmann Karras
fa3cc05753 Turn some non-const refs into pointers 2014-03-17 02:55:57 +01:00
Tillmann Karras
7e39cf3b0d .gitignore: fix the build directory pattern 2014-03-17 02:55:56 +01:00
Tillmann Karras
2fcaca0603 More range-based loops and overrides 2014-03-17 02:55:55 +01:00
Tillmann Karras
3fc9ca0789 UCodes: nits 2014-03-17 02:55:54 +01:00
Tillmann Karras
3c46c0ede9 Interpreter: make some class members private 2014-03-17 02:55:54 +01:00
Lioncash
692deb24ba Remove unused function PanicAlertToVideo from Core.cpp. 2014-03-16 21:07:34 -04:00
Lioncash
5edce0eeb6 Simplify log queue clearing.
Simply just keep popping the queue until it's empty. No point in using a for loop for this.

Combined some if statements too.
2014-03-16 20:58:13 -04:00
Pierre Bourdon
4a906fdf7b Merge pull request #170 from RachelBryk/save-skip-bios
Save bHLE_BS2 to config cache before it can be changed while booting.
2014-03-17 01:06:46 +01:00
Rachel Bryk
89dbec437f Save bHLE_BS2 to config cache before it can be changed while booting.
This variable can be changed in SConfig::AutoSetup, so we need to save it before that is called.
2014-03-16 20:05:09 -04:00
Lioncash
110f603cb6 Remove an unnecessary wx translation underscore macro from PHackSettings.
Also removed an unnecessary string -> wx string conversion.
2014-03-16 19:05:57 -04:00
Lioncash
291c95b780 Cleanup a little bit of the PHackSettings. 2014-03-16 18:42:56 -04:00
Tillmann Karras
a9a15690a2 UCode_AX: don't always call NotifyAXThread()
StartWorking() already does this if needed
2014-03-16 22:05:59 +01:00
Lioncash
a9adaa5601 Prevent VideoConfig inheritance. 2014-03-16 17:00:29 -04:00
Lioncash
bd1ce18f90 Simplify file tree building for the filesystem view.
Technically this also simplifies on disc filename building in general.
2014-03-16 16:54:00 -04:00
Pierre Bourdon
927a97c2a5 Merge pull request #166 from Sonicadvance1/Android-config
Fix the Android build's configuration setting/getting
2014-03-15 18:11:20 +01:00
Ryan Houdek
7b86716c65 Due to the removal of our char* IniFile setters/getters this broke Android build which relied on that.
Convert our C-strings to std::strings before using
2014-03-15 12:09:49 -05:00
Linktothepast
82f772fdcc Remove the extra parameters field from the PH.
Metroid: Other M was the only game which required this field, but the
issue in that game can be fixed properly by enabling format change
emulation. Hence, there's no point in having this around anymore.
Fixes issue 6644.
2014-03-15 15:04:39 +02:00
Lioncash
f325fc9634 Clean up FileHandlerARC.cpp/.h
- Removed parentheses from the returns.
- Put the function declaration headers back on a single line.
- Make FindFileInfo's parameter a const string reference.
2014-03-15 02:14:49 -04:00
Rachel Bryk
aa3ca6d8ea Fix extracting dols.
There is no "/" after partition number when extracting a dol. Also the .remove is completely unneeded.
2014-03-14 21:20:20 -04:00
Lioncash
3b27a2d22e Make WiiSocket function names conform to the coding style. 2014-03-14 20:11:52 -04:00
Pierre Bourdon
8d679e76d2 Merge pull request #164 from lioncash/cstr-cull
Kill off some usages of c_str.
2014-03-15 00:57:56 +01:00
Matthew Parlane
12c2e345a3 Merge pull request #168 from RachelBryk/extract-files
Fix extracting files on partition > 0.
2014-03-15 12:57:46 +13:00
Matthew Parlane
76e3a74c5c Merge pull request #165 from delroth/mi-mmio-fix
MemoryInterface: properly register region MMIOs.
2014-03-15 12:57:01 +13:00
Rachel Bryk
f6dfc1f653 Fix extracting files on partition > 0. 2014-03-14 19:09:36 -04:00
Tony Wasserka
d946e4e238 OpenGL: Implement color and z pokes. 2014-03-14 23:39:52 +01:00
Tony Wasserka
0f81cbd6be PixelShaderGen: More code alignment fixes. 2014-03-14 22:33:26 +01:00
Tony Wasserka
c1016205d3 Pixel/LightingShaderGen: Fix code alignment issues.
Most of these weren't even introduced by me, but hey - I'm nice and love wasting my time :p
2014-03-14 22:33:26 +01:00
Tony Wasserka
2067f88e0f PixelShaderGen: Don't make local lookup tables "static". 2014-03-14 22:33:26 +01:00
Tony Wasserka
0ce92e0162 PixelShaderGen: Remove the "i" prefix for integer variables.
The prefix was just required in the development stage to reduce the risk of regressions.
2014-03-14 22:33:26 +01:00
Tony Wasserka
bdd629c598 PixelShaderGen: Use spaces for alignment where appropriate. 2014-03-14 22:33:26 +01:00
Tony Wasserka
6e65e02c9e ConstantManager: Do not use single-element arrays. 2014-03-14 22:33:25 +01:00
Tony Wasserka
6c2971eaf6 PixelShaderGen: Write 16777215 in hex (0xFFFFFF) so that it's easier to understand. 2014-03-14 22:33:25 +01:00
Tony Wasserka
8ebb65ebf2 PixelShaderGen: Prettify generated shader source. 2014-03-14 22:33:24 +01:00
Tony Wasserka
e2e1c5c905 PixelShaderGen: Add a note about a random idea which should be checked with hardware tests. 2014-03-14 22:33:12 +01:00
Tony Wasserka
6fcbda6752 PixelShaderGen: Cleanup and clarify bump alpha combiner inputs. 2014-03-14 22:33:12 +01:00
Tony Wasserka
9a96a1d525 PixelShaderGen: Remove old, mostly useless comments.
A few vague lines of comments cannot replace an afternoon reading of how TEV works.
2014-03-14 22:33:12 +01:00
Tony Wasserka
8b8bb04fd3 PixelShaderGen: Use bit shifts instead of multiplications as a small optimization. 2014-03-14 22:33:12 +01:00
Tony Wasserka
036a8c6951 PixelShaderGen: Clean up tev compare functionality. 2014-03-14 22:33:10 +01:00
Tony Wasserka
fa7173d099 PixelShaderGen: Store tex scale as an integer. 2014-03-14 22:32:30 +01:00
Tony Wasserka
16109fb453 PixelShaderGen: Treat UV coordinates as actual integers. 2014-03-14 22:32:29 +01:00
Tony Wasserka
50526ae50a PixelShaderGen: Remove some dead code. 2014-03-14 22:32:18 +01:00
Tony Wasserka
065919f599 PixelShaderGen: Perform some of the fog calculations with integers. 2014-03-14 22:31:32 +01:00
Tony Wasserka
605b687af8 PixelShaderGen: Use integer math for z textures. 2014-03-14 22:31:31 +01:00
Tony Wasserka
3a6389992e PixelShaderGen: Treat UV coordinates like S17.7 integers (they're still stored as float, though). 2014-03-14 22:31:30 +01:00
Tony Wasserka
3e6efdb53e LightingShaderGen: Perform more lighting calculations with integers. 2014-03-14 22:31:19 +01:00
Tony Wasserka
387b9bf3c2 LightingShaderGen: Perform some lighting calculations with integers. 2014-03-14 22:31:19 +01:00
Tony Wasserka
78623871f9 ShaderGen: Store material uniforms as integers. 2014-03-14 22:31:19 +01:00
Tony Wasserka
4bf57565e8 ShaderGen: Store light color uniforms as integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka
68e91f0d55 PixelShader: Store fog color as an integer. 2014-03-14 22:31:18 +01:00
Tony Wasserka
0238a56816 PixelShaderGen: Change indirect texture matrix uniforms to use integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka
c13a5c38e9 PixelShaderGen: Change the "alpha" uniform to use integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka
ec60acac3a PixelShaderGen: Change the "colors" and "kcolors" uniforms to be integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka
df94e62350 PixelShaderGen: Process fog calculations with integer math. 2014-03-14 22:31:18 +01:00
Tony Wasserka
21eb482a6e PixelShaderGen: Write constants in decimal instead of hexadecimal where appropriate. 2014-03-14 22:31:11 +01:00
Tony Wasserka
cff952c397 PixelShaderGen: Use integer math for indirect tev stage texcoord calculation. 2014-03-14 22:30:27 +01:00
Tony Wasserka
e7a42d884f PixelShaderGen: prev should be initialized to the proper value; tev output needs to be clamped between -1024 and 1023. 2014-03-14 22:30:16 +01:00
Tony Wasserka
cb1514e082 PixelShaderGen: Remove superfluous registerstate stuff. Also, made alphabump an integer. 2014-03-14 22:30:15 +01:00
Tony Wasserka
a11ae69cb0 PixelShaderGen: Use integer math for TEV combiners. 2014-03-14 22:28:32 +01:00
Tony Wasserka
aaa8e74a68 PixelShaderGen: Use integer math for tev outputs. 2014-03-14 22:28:14 +01:00
Tony Wasserka
654442feb7 PixelShaderGen: Use integer math for tev konst value. 2014-03-14 22:28:12 +01:00
Tony Wasserka
e69ee6ae0a PixelShaderGen: Remove remaining floating point bits for texture color. 2014-03-14 22:26:50 +01:00
Tony Wasserka
ac1c77c392 PixelShaderGen: Use integer math for rasterizer color. 2014-03-14 22:26:50 +01:00
Tony Wasserka
3ea97f7730 PixelShaderGen: Use integer math for indirect texture coords. 2014-03-14 22:26:50 +01:00
Tony Wasserka
0e711bf520 PixelShaderGen: Use integer math for sampling textures. 2014-03-14 22:26:50 +01:00
Tony Wasserka
1b3b12caa0 PixelShaderGen: Fix an issue where small negative z coordinates would underflow when they shouldn't. 2014-03-14 22:26:50 +01:00
Tony Wasserka
fa77e1d2b6 PixelShaderGen: Use integer math for alpha testing. 2014-03-14 22:26:48 +01:00
Ryan Houdek
22c989de9a Provide our own dot functions in GLSL since GLSL doesn't provide integer versions of this function, even though AMD and Nvidia provide their own. 2014-03-14 22:26:27 +01:00
Tony Wasserka
bed442198f PixelShaderGen: Make SampleTexture static inline. 2014-03-14 22:26:26 +01:00
Tony Wasserka
2af50f04c2 OGL: Force highp for integers. 2014-03-14 22:26:26 +01:00