Commit graph

5014 commits

Author SHA1 Message Date
wwylele 9ffd400685 gl_shader_decompiler: add missing headers/rename GetXXX to MoveXXX to reflect that they move the data 2018-04-02 17:34:54 +03:00
wwylele 11c2f11872 gl_shader_decompiler: return error on decompilation failure
Internally these errors are handled by exceptions. Only fallbackable errors (that can be handled by CPU shader emulation) is reported. Completely ill-formed shader is still ASSERTed. Code logic related stuff is DEBUG_ASSERTed
2018-04-02 17:34:54 +03:00
wwylele 4991b15ee5 gl_shader_decompiler: some small fixes
- remove unnecessary ";"
- use std::tie for lexicographical ordering
- simplify loop condition
    The offset always has step +1 on each iteration, so it would just hit one of the two boundary anyway
2018-04-02 17:34:54 +03:00
wwylele f8a292f920 renderer_opengl: add PICA->GLSL shader decompiler 2018-04-02 17:34:54 +03:00
Daniel Lim Wee Soong 1e4eb7def8 arm/dyncom: Migrate logging macros 2018-04-02 16:01:19 +08:00
James Rowe 384849232b
Merge pull request #3516 from wwylele/shadow-sw
SwRasterizer: Implement shadow mapping
2018-03-31 23:29:22 -06:00
Merry fff7227f86
Merge pull request #3579 from ccawley2011/architecture-defines
common: Clean up architecture-specific defines
2018-03-31 10:41:15 +01:00
Merry 587bc06adf
Merge pull request #3596 from lioncash/disk
disk_archive: Minor miscellaneous cleanup
2018-03-31 10:39:00 +01:00
Valentin Vanelslande 4fa1628fb6
movie: migrate logging macros 2018-03-31 00:24:21 -06:00
Lioncash 7d331a469f pica_to_gl: Use std::array where applicable
Removes the need to use the ARRAY_SIZE macro
2018-03-31 00:58:49 -04:00
Lioncash 0e7ca706dc disk_archive: Make DiskDirectory's constructor explicit
Prevents implicit conversions/construction.
2018-03-31 00:54:17 -04:00
Lioncash 07855c48d1 disk_archive: Remove unnecessary const in DiskDirectory's Read() declaration
This only applies in the definition of the function, not the
declaration.
2018-03-31 00:54:17 -04:00
Lioncash ed64d15060 disk_archive: Remove unused total_entries_in_directory member from DiskDirectory
Also converts initializer list assignments to in-class initializers
where relevant.
2018-03-31 00:52:47 -04:00
BreadFish64 1d809ce6aa update-icons-signal 2018-03-30 10:20:21 -05:00
Tobias bb6251f35f video_core: Remove Unreachable for invalid BlendEquation modes (#3595)
* video_core: Remove Unreachable statement

* Lower log level to ERROR
2018-03-29 17:53:55 -06:00
Merry a567a92468
Merge pull request #3593 from daniellimws/loader-fmt
core/loader: Migrate logging macros
2018-03-29 14:45:25 +01:00
Adityarup Laha 180a05c301 sdl2_config: Add a parameter description for tilt clamp variable (#3590) 2018-03-29 10:20:26 +01:00
Weiyi Wang 697ff2f6e3
Merge pull request #3603 from lioncash/port
citra-room: Fix always false case in main() related to port range
2018-03-29 11:53:53 +03:00
Weiyi Wang 1c4b230346
Merge pull request #3604 from lioncash/ptr
archive_systemsavedata: Remove pointer cast from GetSystemSaveDataPath()
2018-03-29 11:52:36 +03:00
Weiyi Wang 82b9387315
Merge pull request #3605 from valentinvanelslande/am-popu64
Service/AM: Use Pop<u64>() in DeleteUserProgram and DeleteProgram
2018-03-29 09:47:56 +03:00
Weiyi Wang 690d92a019
Merge pull request #3601 from lioncash/null
gl_rasterizer: Fix incorrect comparison against src_surface in AccelerateTextureCopy()
2018-03-29 09:44:10 +03:00
Weiyi Wang da91fb41db
Merge pull request #3597 from lioncash/lzss
ncch_container: Get rid of pointer casts in LZSS_GetDecompressedSize() and LZSS_Decompress()
2018-03-29 09:42:25 +03:00
Weiyi Wang feb4eca2ff
Merge pull request #3598 from lioncash/boss
boss: Correct ReceiveProperty()'s response data payload
2018-03-29 09:38:33 +03:00
Weiyi Wang 115fd1cbf0
Merge pull request #3599 from lioncash/err
err_f: Add missing break in ThrowFatalError()
2018-03-29 09:38:19 +03:00
Valentin Vanelslande 528d8a6ccb
CiTrace: Migrate logging macros 2018-03-28 20:48:59 -06:00
Valentin Vanelslande 492fca114d
Service/AM: Use Pop<u64>() in DeleteUserProgram and DeleteProgram 2018-03-28 20:28:18 -06:00
Lioncash 26b1aec3c1 archive_systemsavedata: Remove pointer cast from GetSystemSaveDataPath()
These kinds of casts invoke undefined behavior due to alignment rules.

Use memcpy instead which always does the right thing.
2018-03-28 22:17:26 -04:00
Lioncash 8366f6cb5e citra-room: Fix always false case in main() related to port range
If the variable we're checking is a u16, then there can never be values
outside of the 0-65535 range. This is bad because an arbitrary larger
value can be truncated down into a valid value, making an otherwise
malformed argument well-formed.

Change it to use u32 to allow the check to function properly.
2018-03-28 21:53:05 -04:00
Lioncash 38b9d1780f verify_login: Make VerifyLogin exceptionless
This function can be simplified by attempting to find the username
within the JSON object and then only accessing it if it does. There's no
need to blindly access the data itself.

This also eliminates the need to copy the string to a local as well,
since we already have the element itself, we can just compare against
it. For the failure case, it's the same if we were checking that the
provided username string is empty.
2018-03-28 21:34:21 -04:00
Lioncash 27a3d44b16 gl_rasterizer: Fix incorrect comparison against src_surface in AccelerateTextureCopy()
This should actually be comparing the validity of the destination
surface.
2018-03-28 21:13:57 -04:00
Valentin Vanelslande 542b11ccdc
Change line 203 2018-03-28 19:05:54 -06:00
Lioncash 5ec576ff78 err_f: Add missing break in ThrowFatalError()
Introduced by 691f069743

If we hit a prefetch abort, the DFSR and DFAR contents aren't really going to be
that useful.
2018-03-28 20:33:25 -04:00
Lioncash 31100c582a boss: Correct ReceiveProperty()'s response data payload
This was previously overwriting data in the same index.
2018-03-28 20:26:33 -04:00
Lioncash 3af976e41e ncch_container: Get rid of pointer casts in LZSS_GetDecompressedSize() and LZSS_Decompress()
These kinds of casts invoke undefined behavior, due to both the aliasing
rule, and from an alignment point-of-view. Use the way that's guaranteed
to always work instead.
2018-03-28 19:55:49 -04:00
Daniel Lim Wee Soong fbfc1103fd core/loader: Migrate logging macros
Replace logging to use NGLOG instead of LOG.
2018-03-29 00:08:26 +08:00
Valentin Vanelslande ca6642aa2a
[skip ci] 2018-03-28 08:45:39 -06:00
Daniel Lim Wee Soong 98760336be video_core/shader/shader: Remove include cinttypes 2018-03-28 22:40:16 +08:00
Daniel Lim Wee Soong 730f8a4103 Fix formatting mistakes 2018-03-28 22:28:55 +08:00
Valentin Vanelslande a53365d69e Fix clang 2018-03-27 18:17:04 -06:00
Valentin Vanelslande f1e26fad7f
Fix build 2018-03-27 15:25:57 -06:00
Valentin Vanelslande 4a37d91bc6
change line 528 2018-03-27 14:23:31 -06:00
Valentin Vanelslande e7ac03c941
Service/APT: Migrate logging macros
Macro of line 528 not changed
2018-03-27 14:03:00 -06:00
Daniel Lim Wee Soong 20776b37be Fix wrongly converted specifiers
Sorry that was a lot in one go so some of them had some mistakes
2018-03-27 23:37:36 +08:00
Daniel Lim Wee Soong 0f4c9c9f47 file_util: Remove long long casting on buf.st_size in NGLOG statement 2018-03-27 23:31:08 +08:00
Daniel Lim Wee Soong 968569aa61 Replace format specifiers for all usages of ASSERT_MSG 2018-03-27 23:28:42 +08:00
Ben 4be12d5f56 NWM_UDS:: Check flags in SendTo (#3481)
* NWM_UDS:: Check flags in SendTo

* NWM_UDS: SendTo from Host to only oneClient

* fix u8 in flags

* Send node_map to clients

* Libnetwork: Increase libnetwork version

* Broadcast on dest_node_id 0xFFFF

* fixup: dest_node_id offset

* fixup: dest_node_id offset part 2

* Adressed wwyleles feedback

* Adressed wwylele's nits
2018-03-27 15:01:29 +03:00
BreadFish64 05cf7fe70a QT: Implement themed icons (#3554)
* implement themed icons

* fix theme search paths
2018-03-27 12:11:04 +01:00
Daniel Lim Wee Soong 7abfdb164b hw: Migrate logging macros (#3584)
* hw: Migrate logging macros

Use NGLOG instead of LOG prefixed macros for logging

* gpu: Remove unnecessary casting

At first this line without any casting gave an error. Without knowing which argument is causing the error, I just casted everything. After that forgot to check which argument is the one causing trouble.

* hw: Change format specifiers for the one missed
2018-03-27 12:02:19 +01:00
Daniel Lim Wee Soong 3e8e011c33 network: Migrate logging macros (#3575)
* network: Migrate logging macros

Follow-up of #3533

Replace prefix of all logging macros from LOG to NGLOG

* Remove hash in format
2018-03-27 12:00:14 +01:00
Weiyi Wang 4bdf2e1eb9
Merge pull request #3569 from daniellimws/audio-core-fmt
audio_core: Migrate logging macros
2018-03-27 13:55:24 +03:00
Weiyi Wang 0607bc36e3
Merge pull request #3574 from daniellimws/citra-qt-fmt
citra_qt: Migrate logging macros
2018-03-27 13:52:31 +03:00
Daniel Lim Wee Soong 59b8a1dbc2 assert: Undo removal of newline for string with __VA_ARGS__ 2018-03-27 10:01:10 +08:00
Daniel Lim Wee Soong 301ca0a0a3 Undo unrelated true false ternary statement removal 2018-03-26 21:03:10 +08:00
Daniel Lim Wee Soong 5ddc440b48 Change to print program id as hex 2018-03-26 20:44:49 +08:00
FearlessTobi 245a3bd067 game_list: Add missing override specifier for KeyReleaseEater's eventFilter function 2018-03-25 23:57:25 +02:00
Weiyi Wang 49c41593d9
Merge pull request #3577 from daniellimws/web-service-fmt
web_service: Migrate logging macros
2018-03-25 13:47:46 +03:00
Daniel Lim Wee Soong 111da6db06 common: Migrate logging macros
Follow-up of #3533

Replace logging to use NGLOG instead of LOG

This is significantly larger than the previous ones.
2018-03-25 18:42:50 +08:00
Daniel Lim Wee Soong 4617fec970 input_common: Migrate logging macros
Follow-up of #3533

Replace logging to use NGLOG instead of LOG
2018-03-25 17:46:02 +08:00
Daniel Lim Wee Soong 978a169cc4 Drop # for formatting program id 2018-03-25 15:48:29 +08:00
Daniel Lim Wee Soong c82cd30f62 web_service: Migrate logging macros
Follow-up of #3533

Replace prefix of all logging macros from LOG to NGLOG
2018-03-25 15:35:06 +08:00
Daniel Lim Wee Soong 79b0e62455 citra_qt: Migrate logging macros
Follow-up of #3533

Replace prefix of all logging macros from LOG to NGLOG
2018-03-25 13:00:36 +08:00
James 9283053701 Move WebServices to use LibreSSL + cpp-httplib (#3501)
Move WebServices to use LibreSSL + cpp-httplib

Remove curl + openssl build dependencies
2018-03-24 13:19:35 -06:00
Valentin Vanelslande e2c5666883 Service/AM: Fix crash when scanning titles with installed titles with invalid title IDs (#3542)
* Service/AM: Fix crash when scanning titles with installed titles with invalid title IDs

Fixes #3332
2018-03-24 13:06:50 -06:00
Daniel Lim Wee Soong 38e2b6c8d8 Undo changes to unrelated files and fix formatting 2018-03-25 00:54:40 +08:00
Daniel Lim Wee Soong df816b5eaf Address review comments
* Convert %x to {:x}
* Convert {0:#010x} to {:#010x}
* Remove `? true : false` statement
* Remove `.c_str()` for strings
2018-03-24 22:25:50 +08:00
Daniel Lim Wee Soong 693b190274 audio_core: Migrate logging macros
Follow-up of #3533

Replace prefix of all logging macros from LOG to NGLOG
2018-03-24 21:45:58 +08:00
Merry 174e7e268a
Merge pull request #3533 from daniellimws/fmtlib-macros
Logging: Add fmtlib-based macros
2018-03-24 08:04:20 +00:00
Daniel Lim Wee Soong 11ce0f91ab Remove dependency chrono
Was included last time due to adding Entry into log.h

Now it is no longer needed but I forgot to remove it last time
2018-03-22 21:42:02 +08:00
Cameron Cawley 2520ad57a5 common: Use ARCHITECTURE_x86_64 instead of ARCHITECTURE_X64 2018-03-21 22:19:59 +00:00
Cameron Cawley 1afcaed1ff common: Use ARCHITECTURE_ARM instead of _M_ARM 2018-03-21 22:17:42 +00:00
Daniel Lim Wee Soong 4adbf29b0c Fix clang-format
Oops forgot to check...
2018-03-22 00:45:01 +08:00
Daniel Lim Wee Soong e6ee1020e1 Replace ##__VA_ARGS__ with __VA_ARGS__ 2018-03-22 00:40:01 +08:00
Daniel Lim Wee Soong c892cea029 Place FmtLogMessage's definition in backend.cpp
I decided to overload LogMessage because I don't see a reason to come up with a new function name just for this, but if you guys want me to overload FmtLogMessage instead I'm fine with that.
2018-03-21 23:36:45 +08:00
Weiyi Wang d03f72eb56
Merge pull request #3535 from ccawley2011/emu_arch_bits
CMake: Set EMU_ARCH_BITS in CMakeLists.txt
2018-03-21 16:15:22 +02:00
Daniel Lim Wee Soong ceeb2810fe Add nullptr check to LogEntry
Also remove explicit comparison with nullptr to make code shorter.
2018-03-20 14:15:48 +08:00
Weiyi Wang 9e4f670ea9
Merge pull request #3484 from wwylele/highlight-fix
pica/lighting: compute highlight clamp after one-/two-sided diffuse pass
2018-03-18 23:41:27 +02:00
Weiyi Wang 42ed0254db
Merge pull request #3528 from BreadFish64/auto-nvidia
use nvidia graphics automatically on laptops with optimus
2018-03-18 23:41:08 +02:00
Mat M 79d1bcf5ba
Merge pull request #3506 from MerryMage/mov-gl_resource_manager
gl_resource_manager: Use std::exchange in move assignment operators and constructors
2018-03-17 16:30:58 -04:00
Daniel Lim Wee Soong 2b4998a122 Add check if filter is not a nullptr
Fix segfault and pass tests
2018-03-17 22:55:57 +08:00
Weiyi Wang 171cb4452f
Merge pull request #3498 from wwylele/cfg-new-framework
Service/CFG: convert to ServiceFramework
2018-03-17 13:54:29 +02:00
Markus Wick ac92664aa7 OGL: Use stream buffer for vertex data. 2018-03-17 02:02:39 +01:00
Phantom 50598fbbf4 stream buffer 2018-03-17 02:02:39 +01:00
MerryMage e3f9bfd850 gl_resource_manager: Use std::exchange instead of std::swap in move assignment operators and constructors
Move assignment operators and move constructors should ideally leave the object moved from in a state where resources aren't accessable.
2018-03-16 23:47:49 +00:00
BreadFish64 691aadb6a3 comment 2018-03-16 16:06:33 -05:00
Cameron Cawley 8d1cab4892 CMake: Set EMU_ARCH_BITS in CMakeLists.txt 2018-03-16 13:29:36 +00:00
Daniel Lim Wee Soong c4f98c1a2e Logging: Fix clang-format 2018-03-16 21:18:45 +08:00
Daniel Lim Wee Soong b5532babab Merge remote-tracking branch 'citra/master' into fmtlib-macros 2018-03-16 20:50:52 +08:00
Starlet 935bcdbd20 Convert ACT to the new service framework (#3521)
* Convert ACT to the new service framework

* Fix clang-format

* le updates to fix stuff

* Fixed one last thing.

* Well, I fucked up.

* Quick hotfix
2018-03-16 11:36:35 +02:00
Daniel Lim Wee Soong 327901e145 citra_qt: Remove reference to debugger/console 2018-03-16 12:24:16 +08:00
Daniel Lim Wee Soong 98e669cf00 Remove all edits not in the scope of this PR 2018-03-16 12:17:14 +08:00
Daniel Lim Wee Soong 373efd3158 Logging: Remove customizable logging backends
Separate code for customizing logging backends from this branch
2018-03-16 11:56:40 +08:00
Daniel Lim Wee Soong eee388588e Logging: Fix fmt errors after rebasing with master
fmt was updated during the clang-format update, which breaks the previous implementation of FmtLogMessage

Changes were:
* Move definition of FmtLogMessage into log.h to use variadic templates as FMT_VARIADIC was removed

To supplement the change above:
* Move Entry and CreateEntry into log.h
* Add LogEntry in backend.cpp
2018-03-16 11:48:33 +08:00
James Rowe ab4ba71f3e fixup! Prevent crashes on closing by waiting for the impl thread 2018-03-16 11:18:06 +08:00
James Rowe 87bc5266ef Logging: Various logging improvements
* Uses PopWait to reduce the amount of busy waiting if there aren't many
new logs
* Opens the log file as shared on windows, letting other programs read
the logs, but not write to them while citra is running
* Flushes the logs to disk if a log >= error arrives
2018-03-16 11:18:06 +08:00
James Rowe 9fdc89a456 SPSCQueue: Add PopWait
Adds a condition var to SPSCQueue so when a new log is pushed it will
wake the consumer thread that is calling PopWait. This only applies to
to queues with NeedSize=true
2018-03-16 11:18:06 +08:00
James Rowe 47f0185bcd fixup! move message 2018-03-16 11:18:06 +08:00
James Rowe 7b78425d6b Address review comments 2018-03-16 11:18:06 +08:00
James Rowe f6762f05cd Use the correct linker flag for mingw 2018-03-16 11:18:06 +08:00
James Rowe 0daac3020e Logging: Add customizable logging backends and fmtlib based macros
* Change the logging backend to support multiple sinks through the
Backend Interface
* Add a new set of logging macros to use fmtlib instead.
* Qt: Compile as GUI application on windows to make the console hidden by
default. Add filter configuration and a button to open log location.
* SDL: Migrate to the new logging macros
2018-03-16 11:18:06 +08:00
BreadFish64 55d5720962 use nvidia graphics automatically on laptops with optimus 2018-03-15 20:36:53 -05:00