Commit Graph
100 Commits
Author SHA1 Message Date
gdkandThog 79de8fd490 Share texture pool cache between graphics and compute 2020-01-09 02:13:00 +01:00
gdkandThog 2437ccca0e Separate sub-channel state 2020-01-09 02:13:00 +01:00
gdkandThog 3ca675223a Remove TranslatorConfig struct 2020-01-09 02:13:00 +01:00
gdkandThog 6a8ba6d600 Add R2P shader instruction 2020-01-09 02:13:00 +01:00
gdkandThog 8eb773d81f Make the shader translator more error resilient (part 2) 2020-01-09 02:13:00 +01:00
gdkandThog 04102e5c9d Make the shader translator more error resilient 2020-01-09 02:13:00 +01:00
gdkandThog eea73bc421 Add missing check for BRX, do not add a out of bounds block to the queue 2020-01-09 02:13:00 +01:00
gdkandThog 6e399061ce Invalidate shaders when they are modified 2020-01-09 02:13:00 +01:00
gdkandThog f0a59f345c Add partial support for the BRX shader instruction 2020-01-09 02:13:00 +01:00
gdkandThog d274328c31 Fix image units bindings and shader dump in the presence of NOPs 2020-01-09 02:13:00 +01:00
gdkandThog d620aa7d1b Revert "Check for ASTC support on the list of supported compressed formats"
This reverts commit 38a993510f64346649529b8fd2af6683bef05aa6.
2020-01-09 02:13:00 +01:00
gdkandThog cd47600e57 Check for ASTC support on the list of supported compressed formats 2020-01-09 02:13:00 +01:00
gdkandThog f6e96551bf Fix regression on load/store local (wrong type) 2020-01-09 02:13:00 +01:00
gdkandThog fd196b3d19 Do not throw for invalid ASTC compressed textures 2020-01-09 02:13:00 +01:00
gdkandThog 769c02235f Add ATOMS, LDS, POPC, RED, STS and VOTE shader instructions, start changing the way how global memory is handled 2020-01-09 02:13:00 +01:00
gdkandThog 1e8bc29f32 Use a more efficient range list on the buffer manager 2020-01-09 02:13:00 +01:00
gdkandThog a31fced221 Remove some unused constants and other code 2020-01-09 02:13:00 +01:00
gdkandThog 3ab5c23f49 Add partial support for array of samplers, and add pass to identify them from bindless texture accesses 2020-01-09 02:13:00 +01:00
gdkandThog 63345a3098 Support window resizing 2020-01-09 02:13:00 +01:00
gdkandThog 278a4c317c Implement BFI, BRK, FLO, FSWZADD, PBK, SHFL and TXD shader instructions, misc. fixes 2020-01-09 02:13:00 +01:00
gdkandThog 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
gdkandThog 3bcc395253 Add shader support for the round mode on the F2F instruction, support mipmaps on ASTC compressed textures 2020-01-09 02:13:00 +01:00
gdkandThog d3fcab8511 Fix shader FMUL32I instruction saturation 2020-01-09 02:13:00 +01:00
gdkandThog f2e84ff566 Flush buffers on copies 2020-01-09 02:13:00 +01:00
gdkandThog 8cba252b23 Add per-source type memory change tracking, simplified state change tracking, other fixes 2020-01-09 02:13:00 +01:00
gdkandThog 1b7d955195 Initial support for image stores, support texture sample on compute 2020-01-09 02:13:00 +01:00
gdkandThog 717ace6f6e Fix incorrect saturation on HADD2 and HMUL2 shader instructions 2020-01-09 02:13:00 +01:00
gdkandThog 873bb4c15a Fix BC6 Signed/Unsigned float texture formats 2020-01-09 02:13:00 +01:00
gdkandThog f90ee9b707 Handle quad and quad strip primitive types using triangle fans 2020-01-09 02:13:00 +01:00
gdkandThog cdeeac163f Improved Min/Mip -> MinFilter enum conversion 2020-01-09 02:13:00 +01:00
gdkandThog 1bb08742c1 Calculate width from stride on texture copies 2020-01-09 02:13:00 +01:00
gdkandThog 1876b346fe Initial work 2020-01-09 02:13:00 +01:00
gdkchanandAc_K 87bfe681ef Fix remap ioctl map offset (#852)
* Fix remap ioctl map offset

* Correct offset type
2019-12-25 02:54:26 +01:00
gdkchanandGitHub e5858e2c7d Add a limit for the number of instructions in a function (#843) 2019-12-14 18:18:51 -03:00
gdkchanandGitHub 306eeead06 Update license (#788)
After some internal discussion, we decided to change the project license to MIT. I have already talked with most contributors privately, and none of them are against the change. Still, if you're a contributor and you're against the change, feel free to voice your concerns here.

Obviously, any code before the license change can be still used under the terms of the old license. But any new code after the change will be under the terms of the new license.
2019-10-12 23:48:31 -03:00
gdkchanandemmauss a731ab3a2a Add a new JIT compiler for CPU code (#693)
* Start of the ARMeilleure project

* Refactoring around the old IRAdapter, now renamed to PreAllocator

* Optimize the LowestBitSet method

* Add CLZ support and fix CLS implementation

* Add missing Equals and GetHashCode overrides on some structs, misc small tweaks

* Implement the ByteSwap IR instruction, and some refactoring on the assembler

* Implement the DivideUI IR instruction and fix 64-bits IDIV

* Correct constant operand type on CSINC

* Move division instructions implementation to InstEmitDiv

* Fix destination type for the ConditionalSelect IR instruction

* Implement UMULH and SMULH, with new IR instructions

* Fix some issues with shift instructions

* Fix constant types for BFM instructions

* Fix up new tests using the new V128 struct

* Update tests

* Move DIV tests to a separate file

* Add support for calls, and some instructions that depends on them

* Start adding support for SIMD & FP types, along with some of the related ARM instructions

* Fix some typos and the divide instruction with FP operands

* Fix wrong method call on Clz_V

* Implement ARM FP & SIMD move instructions, Saddlv_V, and misc. fixes

* Implement SIMD logical instructions and more misc. fixes

* Fix PSRAD x86 instruction encoding, TRN, UABD and UABDL implementations

* Implement float conversion instruction, merge in LDj3SNuD fixes, and some other misc. fixes

* Implement SIMD shift instruction and fix Dup_V

* Add SCVTF and UCVTF (vector, fixed-point) variants to the opcode table

* Fix check with tolerance on tester

* Implement FP & SIMD comparison instructions, and some fixes

* Update FCVT (Scalar) encoding on the table to support the Half-float variants

* Support passing V128 structs, some cleanup on the register allocator, merge LDj3SNuD fixes

* Use old memory access methods, made a start on SIMD memory insts support, some fixes

* Fix float constant passed to functions, save and restore non-volatile XMM registers, other fixes

* Fix arguments count with struct return values, other fixes

* More instructions

* Misc. fixes and integrate LDj3SNuD fixes

* Update tests

* Add a faster linear scan allocator, unwinding support on windows, and other changes

* Update Ryujinx.HLE

* Update Ryujinx.Graphics

* Fix V128 return pointer passing, RCX is clobbered

* Update Ryujinx.Tests

* Update ITimeZoneService

* Stop using GetFunctionPointer as that can't be called from native code, misc. fixes and tweaks

* Use generic GetFunctionPointerForDelegate method and other tweaks

* Some refactoring on the code generator, assert on invalid operations and use a separate enum for intrinsics

* Remove some unused code on the assembler

* Fix REX.W prefix regression on float conversion instructions, add some sort of profiler

* Add hardware capability detection

* Fix regression on Sha1h and revert Fcm** changes

* Add SSE2-only paths on vector extract and insert, some refactoring on the pre-allocator

* Fix silly mistake introduced on last commit on CpuId

* Generate inline stack probes when the stack allocation is too large

* Initial support for the System-V ABI

* Support multiple destination operands

* Fix SSE2 VectorInsert8 path, and other fixes

* Change placement of XMM callee save and restore code to match other compilers

* Rename Dest to Destination and Inst to Instruction

* Fix a regression related to calls and the V128 type

* Add an extra space on comments to match code style

* Some refactoring

* Fix vector insert FP32 SSE2 path

* Port over the ARM32 instructions

* Avoid memory protection races on JIT Cache

* Another fix on VectorInsert FP32 (thanks to LDj3SNuD

* Float operands don't need to use the same register when VEX is supported

* Add a new register allocator, higher quality code for hot code (tier up), and other tweaks

* Some nits, small improvements on the pre allocator

* CpuThreadState is gone

* Allow changing CPU emulators with a config entry

* Add runtime identifiers on the ARMeilleure project

* Allow switching between CPUs through a config entry (pt. 2)

* Change win10-x64 to win-x64 on projects

* Update the Ryujinx project to use ARMeilleure

* Ensure that the selected register is valid on the hybrid allocator

* Allow exiting on returns to 0 (should fix test regression)

* Remove register assignments for most used variables on the hybrid allocator

* Do not use fixed registers as spill temp

* Add missing namespace and remove unneeded using

* Address PR feedback

* Fix types, etc

* Enable AssumeStrictAbiCompliance by default

* Ensure that Spill and Fill don't load or store any more than necessary
2019-08-08 21:56:22 +03:00
gdkchanandjduncanator 8a7d99cdea Refactoring and optimization on CPU translation (#661)
* Refactoring and optimization on CPU translation

* Remove now unused property

* Rename ilBlock -> block (local)

* Change equality comparison on RegisterMask for consistency

Co-Authored-By: gdkchan <gab.dark.100@gmail.com>

* Add back the aggressive inlining attribute to the Synchronize method

* Implement IEquatable on the Register struct

* Fix identation
2019-04-26 14:55:12 +10:00
gdkchanandjduncanator 26be1cb4e2 Implement gl_ClipDistance on the shader generator (#680)
* Implement gl_ClipDistance on the shader generator, do not return the undef name for unknown built-in attributes

* Handle unknown attribute loads aswell
2019-04-25 09:09:01 +10:00
gdkchanandjduncanator 6b23a2c125 New shader translator implementation (#654)
* Start implementing a new shader translator

* Fix shift instructions and a typo

* Small refactoring on StructuredProgram, move RemovePhis method to a separate class

* Initial geometry shader support

* Implement TLD4

* Fix -- There's no negation on FMUL32I

* Add constant folding and algebraic simplification optimizations, nits

* Some leftovers from constant folding

* Avoid cast for constant assignments

* Add a branch elimination pass, and misc small fixes

* Remove redundant branches, add expression propagation and other improvements on the code

* Small leftovers -- add missing break and continue, remove unused properties, other improvements

* Add null check to handle empty block cases on block visitor

* Add HADD2 and HMUL2 half float shader instructions

* Optimize pack/unpack sequences, some fixes related to half float instructions

* Add TXQ, TLD, TLDS and TLD4S shader texture instructions, and some support for bindless textures, some refactoring on codegen

* Fix copy paste mistake that caused RZ to be ignored on the AST instruction

* Add workaround for conditional exit, and fix half float instruction with constant buffer

* Add missing 0.0 source for TLDS.LZ variants

* Simplify the switch for TLDS.LZ

* Texture instructions related fixes

* Implement the HFMA instruction, and some misc. fixes

* Enable constant folding on UnpackHalf2x16 instructions

* Refactor HFMA to use OpCode* for opcode decoding rather than on the helper methods

* Remove the old shader translator

* Remove ShaderDeclInfo and other unused things

* Add dual vertex shader support

* Add ShaderConfig, used to pass shader type and maximum cbuffer size

* Move and rename some instruction enums

* Move texture instructions into a separate file

* Move operand GetExpression and locals management to OperandManager

* Optimize opcode decoding using a simple list and binary search

* Add missing condition for do-while on goto elimination

* Misc. fixes on texture instructions

* Simplify TLDS switch

* Address PR feedback, and a nit
2019-04-18 09:57:08 +10:00
gdkchanandjduncanator e21ebbf666 Misc. CPU optimizations (#575)
* Add optimizations related to caller/callee saved registers, thread synchronization and disable tier 0

* Refactoring

* Add a config entry to enable or disable the reg load/store opt.

* Remove unnecessary register state stores for calls when the callee is know

* Rename IoType to VarType

* Enable tier 0 while fixing some perf issues related to tier 0

* Small tweak -- Compile before adding to the cache, to avoid lags

* Add required config entry
2019-02-28 13:03:31 +11:00
gdkchanandjduncanator 81aa50feb0 Optimize MOVI/MVNI instructions using intrinsics (#606) 2019-02-26 23:50:36 +11:00
gdkchanandjduncanator ef3f9a2abe Optmize BFM instruction (#607) 2019-02-26 20:16:50 +11:00
gdkchanandjduncanator 504f4f4abf Remove all the calls to StaticCast methods (#605) 2019-02-26 10:46:34 +11:00
gdkchanandjduncanator 5001f78b1d Optimize address translation and write tracking on the MMU (#571)
* Implement faster address translation and write tracking on the MMU

* Rename MemoryAlloc to MemoryManagement, and other nits

* Support multi-level page tables

* Fix typo

* Reword comment a bit

* Support scalar vector loads/stores on the memory fast path, and minor fixes

* Add missing cast

* Alignment

* Fix VirtualFree function signature

* Change MemoryProtection enum to uint aswell for consistency
2019-02-24 18:24:35 +11:00
gdkchanandGitHub 9679896b94 Implement fixed-point variant of the UCVTF and SCVTF instructions (#578)
* Add fixed-point variant of the UCVTF instruction

* Change encoding of some fixed-point instructions to not allow invalid encodings

* Fix Fcvtzu_Gp_Fixed encoding

* Add SCVTF (fixed-point GP to Scalar) instruction

* Simplify *Fixed encodings
2019-02-23 20:52:48 -03:00
gdkchanandjduncanator 7ed2b4cc39 Initialize FrontFace register with a default value (#601) 2019-02-22 16:14:02 +11:00
gdkchanandjduncanator 6335753e38 Implement ConvertScalingMode properly (#596)
* Implement ConvertScalingMode properly

* Fix up the naming

* Only values 2 and 4 are allowed

* Return a nullable enum from ConvetScalingMode

* Fix typo on method name

* Use convertedScalingMode
2019-02-19 11:12:53 +11:00
gdkchanandjduncanator 932224f051 ARM exclusive monitor and multicore fixes (#589)
* Implement ARM exclusive load/store with compare exchange insts, and enable multicore by default

* Fix comment typo

* Support Linux and OSX on MemoryAlloc and CompareExchange128, some cleanup

* Use intel syntax on assembly code

* Adjust identation

* Add CPUID check and fix exclusive reservation granule size

* Update schema multicore scheduling default value

* Make the cpu id check code lower case aswell
2019-02-19 10:52:06 +11:00
gdkchanandjduncanator 948a758270 Optimize CMN/ADDS to do a single comparision like CMP/SUBS (#576) 2019-02-18 15:17:34 +11:00
gdkchanandThomas Guillemard b5fcf883e8 Implement IStorage GetSize (#585) 2019-02-15 16:44:25 +01:00
gdkchanandjduncanator 9cbcbaa90c Fix XMAD shader instruction, gl_FrontFacing and enable face culling (#583)
* Fix XMAD shader instruction implementation

* Fix gl_FrontFacing constant value

* Enable face culling again

* Fix typo
2019-02-15 14:23:14 +11:00
gdkchanandjduncanator 7e9f555574 Change timestamp value on GPU query with timestamp and counter writeback (#547)
This issue was reported by `Mark290580`, and, according to them causes rendering issues on SMO.
2019-02-13 13:40:25 +11:00
gdkchanandGitHub 8eebbc736e Do not increment played wave buffers count for empty wave buffers (#568)
* Do not increment played wave buffers count for empty wave buffers

* Remove unused setter
2019-02-12 14:05:05 -03:00
gdkchanandGitHub a694420d11 Implement speculative translation on the CPU (#515)
* Implement speculative translation on the cpu, and change the way how branches to unknown or untranslated addresses works

* Port t0opt changes and other cleanups

* Change namespace from translation related classes to ChocolArm64.Translation, other minor tweaks

* Fix typo

* Translate higher quality code for indirect jumps aswell, and on some cases that were missed when lower quality (tier 0) code was available

* Remove debug print

* Remove direct argument passing optimization, and enable tail calls for BR instructions

* Call delegates directly with Callvirt rather than calling Execute, do not emit calls for tier 0 code

* Remove unused property

* Rename argument on ArmSubroutine delegate
2019-02-04 18:26:05 -03:00
gdkchanandGitHub e10ff17e2d Initial support for shader half float instructions (#507) 2019-01-31 09:43:24 -03:00
gdkchanandGitHub c1bdf19061 Implement some ARM32 memory instructions and CMP (#565)
* Implement ARM32 memory instructions: LDM, LDR, LDRB, LDRD, LDRH, LDRSB, LDRSH, STM, STR, STRB, STRD, STRH (immediate and register + immediate variants), implement CMP (immediate and register shifted by immediate variants)

* Rename some opcode classes and flag masks for consistency

* Fix a few suboptimal ARM32 codegen issues, only loads should be considered on decoder when checking if Rt == PC, and only NZCV flags should be considered for comparison optimizations

* Take into account Rt2 for LDRD instructions aswell when checking if the instruction changes PC

* Re-align arm32 instructions on the opcode table
2019-01-29 13:06:11 -03:00
gdkchanandGitHub 36b9ab0e48 Add ARM32 support on the translator (#561)
* Remove ARM32 interpreter and add ARM32 support on the translator

* Nits.

* Rename Cond -> Condition

* Align code again

* Rename Data to Alu

* Enable ARM32 support and handle undefined instructions

* Use the IsThumb method to check if its a thumb opcode

* Remove another 32-bits check
2019-01-24 23:59:53 -02:00
gdkchanandGitHub 22bacc6188 Improve kernel IPC implementation (#550)
* Implement some IPC related kernel SVCs properly

* Fix BLZ decompression when the segment also has a uncompressed chunck

* Set default cpu core on process start from ProgramLoader, remove debug message

* Load process capabilities properly on KIPs

* Fix a copy/paste error in UnmapPhysicalMemory64

* Implement smarter switching between old and new IPC system to support the old HLE services implementation without the manual switch

* Implement RegisterService on sm and AcceptSession (partial)

* Misc fixes and improvements on new IPC methods

* Move IPC related SVCs into a separate file, and logging on RegisterService (sm)

* Some small fixes related to receive list buffers and error cases

* Load NSOs using the correct pool partition

* Fix corner case on GetMaskFromMinMax where range is 64, doesn't happen in pratice however

* Fix send static buffer copy

* Session release, implement closing requests on client disconnect

* Implement ConnectToPort SVC

* KLightSession init
2019-01-18 20:26:39 -02:00
gdkchan 016156c288 This kind of thing drives me crazy 2019-01-01 14:01:44 -03:00
gdkchanandGitHub 1fd1ec5664 Do not attempt to read unused attribute, fix attributes count (#520) 2018-12-26 17:29:50 -02:00
gdkchanandGitHub 0039bb6394 Refactor SVC handler (#540)
* Refactor SVC handler

* Get rid of KernelErr

* Split kernel code files into multiple folders
2018-12-18 03:33:36 -02:00
gdkchanandGitHub 36e8e074c9 Misc. CPU improvements (#519)
* Fix and simplify TranslatorCache

* Fix some assignment alignments, remove some unused usings

* Changes to ILEmitter, separate it from ILEmitterCtx

* Rename ILEmitter to ILMethodBuilder

* Rename LdrLit and *_Fix opcodes

* Revert TranslatorCache impl to the more performant one, fix a few issues with it

* Allow EmitOpCode to be called even after everything has been emitted

* Make Emit and AdvanceOpCode private, simplify it a bit now that it starts emiting from the entry point

* Remove unneeded temp use

* Add missing exit call on TestExclusive

* Use better hash

* Implement the == and != operators
2018-12-10 22:58:52 -02:00
gdkchanandGitHub 3615a70cae Revert "Adjust naming conventions and general refactoring in HLE Project (#490)" (#526)
This reverts commit 85dbb9559a.
2018-12-04 22:52:39 -02:00
gdkchanandGitHub c86aacde76 NVDEC implementation using FFmpeg (#443)
* Initial nvdec implementation using FFmpeg

* Fix swapped channels on the video decoder and the G8R8 texture format

* Fix texture samplers not being set properly (regression)

* Rebased

* Remove unused code introduced on the rebase

* Add support for RGBA8 output format on the video image composer

* Correct spacing

* Some fixes for rebase and other tweaks

* Allow size mismatch on frame copy

* Get rid of GetHostAddress calls on VDec
2018-12-03 00:38:47 -02:00
gdkchanandGitHub 59964f667c Add support for bigger UBOs, fix sRGB regression, small improvement t… (#503)
* Add support for bigger UBOs, fix sRGB regression, small improvement to the 2D copy engine

* Break into multiple lines

* Read fractions for source/step values on the 2d copy engine aswell

* Use fixed point math for more speed

* Fix reinterpret when texture sizes are different
2018-11-28 21:09:44 -02:00
gdkchanandGitHub 00579927e4 Better process implementation (#491)
* Initial implementation of KProcess

* Some improvements to the memory manager, implement back guest stack trace printing

* Better GetInfo implementation, improve checking in some places with information from process capabilities

* Allow the cpu to read/write from the correct memory locations for accesses crossing a page boundary

* Change long -> ulong for address/size on memory related methods to avoid unnecessary casts

* Attempt at implementing ldr:ro with new KProcess

* Allow BSS with size 0 on ldr:ro

* Add checking for memory block slab heap usage, return errors if full, exit gracefully

* Use KMemoryBlockSize const from KMemoryManager

* Allow all methods to read from non-contiguous locations

* Fix for TransactParcelAuto

* Address PR feedback, additionally fix some small issues related to the KIP loader and implement SVCs GetProcessId, GetProcessList, GetSystemInfo, CreatePort and ManageNamedPort

* Fix wrong check for source pages count from page list on MapPhysicalMemory

* Fix some issues with UnloadNro on ldr:ro
2018-11-28 20:18:09 -02:00
gdkchanandAc_K b7613dd4b8 Enable SRGB framebuffers by default (#502) 2018-11-17 05:10:51 +01:00
gdkchanandAc_K d2bb458b51 Improved GPU command lists decoding (#499)
* Better implementation of the DMA pusher, misc fixes

* Remove some debug code

* Correct RGBX8 format

* Add support for linked Texture Sampler Control

* Attempt to fix upside down screen issue
2018-11-17 05:01:31 +01:00
gdkchanandAc_K b833183ef6 HwOpus service implementation (#201)
* Started to implement the hwopus service

* Write outputs on decode method, some basic error handling

* Fix buffer size read from header and check

* Fix order of values
2018-11-17 04:36:49 +01:00
gdkchanandAc_K 85ffd76016 Force cache to remove entries when memory usage exceeds a given threshold (#492) 2018-11-14 23:22:02 +01:00
gdkchanandAc_K 453543fb88 Initialize blend registers with default values (#497) 2018-11-14 22:50:31 +01:00
gdkchanandGitHub a4822b7946 Fix BLR when the source reg is X30 (#493) 2018-11-09 16:41:20 -02:00
gdkchanandGitHub 44c1cf3fe5 Implment common and independent blend properly (fixes #458) (#485)
* Implment common and independent blend properly

* Nits
2018-11-01 01:22:24 -03:00
gdkchan 5a87e58183 Fix regression caused by wrong time delta calculation on cache deletion methods 2018-10-30 11:42:27 -03:00
gdkchanandGitHub 5b13ee655c Fix the rotate right method on ABitUtils (#486) 2018-10-28 22:18:58 -03:00
gdkchanandAc_K 111d14f74a Crop instead of resizing on 2d engine texture copies (#482)
* Crop instead of resizing on 2d engine texture copies

* Remove unused local
2018-10-27 18:46:17 +00:00
gdkchanandGitHub f0a49a1c94 Fix Color Mask values (#473)
* Fix color mask common, set default value on first color mask register

* Missing check

* Better exception messages

* Address PR feedback

* Add fixme as per review feedback
2018-10-25 18:30:09 -03:00
gdkchanandGitHub 2fd23577ce Move prio/core locals inside the lock on yield (#478) 2018-10-24 09:45:37 -03:00
gdkchanandGitHub 9ace6b9285 Fix for render target and a shader compilation issue (#471)
* Fix render target using possibly deleted or wrong handles

* Fix basic blocks with only a KIL instruction on the shader translator

* Formatting fix
2018-10-23 17:59:52 -03:00
gdkchanandGitHub 044b84b078 Add depth range support on the GPU (#472)
* Add depth range support on the GPU

* Address PR feedback
2018-10-23 16:04:08 -03:00
gdkchanandAc_K 2cb8541462 Print stack trace on invalid memory accesses (#461)
* Print stack trace on invalid memory accesses

* Rebased, change code region base address for 39-bits address space, print stack trace on break and undefined instructions too
2018-10-20 22:07:52 +00:00
gdkchanandGitHub 0e1e094b7a Improve texture tables (#457)
* Improve texture tables

* More renaming and other tweaks

* Minor tweaks
2018-10-17 18:02:23 -03:00
gdkchanandGitHub 02a8e7fc93 Remove unnecessary usings (#463)
* Remove unnecessary usings

* Fix CastExpression while I'm at it
2018-10-17 14:55:10 -03:00
gdkchanandGitHub 72317d7777 Add support for saturation on some shader instructions, fix ReadTexture alignment and add ColorMask support (#451)
* Add support for saturation on some shader instructions, fix ReadTexture alignment

* Add ColorMask support, other tweaks
2018-10-13 23:54:14 -03:00
gdkchanandAc_K aa1cd849cf Quads, QuadStrip, const attributes and half-float attributes support (#447)
* Quads, QuadStrip and const attributes support

* Add support for half float attributes and fix texture pitch alignment

* Throw when an unsupported float type is used as const attribute aswell
2018-10-13 01:37:01 +00:00
gdkchanandGitHub dd3cb33c9f Fix race condition on OpenALAudioOut (#448) 2018-10-12 18:47:53 -03:00
gdkchanandGitHub 74ca82c534 Tweak cpu cache deletion policy values (#433)
* Tweak cpu cache deletion policy values

* Address PR feedback
2018-10-07 23:40:37 -03:00
gdkchanandGitHub 0b52ee6627 Optimize BIC, BSL, BIT, BIF, XTN, ZIP, DUP (Gp), FMADD (Scalar) and FCVT (Scalar) using SSE intrinsics (#405)
* Optimize BIC, BSL, BIT, BIF, XTN, ZIP, DUP (Gp), FMADD (Scalar) and FCVT (Scalar) using SSE intrinsics, some CQ improvements

* Remove useless space

* Address PR feedback

* Revert EmitVectorZero32_128 changes
2018-09-26 23:30:21 -03:00
gdkchanandThomas Guillemard 7de7b559ad Improve kernel events implementation (#430)
* Improve kernel events implementation

* Some cleanup

* Address PR feedback
2018-09-23 20:11:46 +02:00
gdkchanandGitHub 54ed9096bd Add FMAXP and FMINP (Vector) instructions on the CPU (#412)
* Add FMAXP and FMINP (Vector) instructions on the CPU

* Address PR feedback
2018-09-22 17:26:18 -03:00
gdkchanandGitHub 6d65e53664 Remove cold methods from the CPU cache (#224)
* Remove unused tracing functionality from the CPU

* GetNsoExecutable -> GetExecutable

* Unsigned comparison

* Re-add cpu tracing

* Config change

* Remove cold methods from the translation cache on the cpu

* Replace lock with try lock, pass new ATranslatorCache instead of ATranslator

* Rebase fixups
2018-09-19 17:07:56 -03:00
gdkchanandGitHub 99b2692425 Fix performance regression caused by the new scheduler changes (#422)
* Call interrupt less often, remove some leftovers from the old scheduler code

* Remove unneeded attribute
2018-09-19 12:16:20 -03:00
gdkchanandGitHub b8133c1997 Thread scheduler rewrite (#393)
* Started to rewrite the thread scheduler

* Add a single core-like scheduling mode, enabled by default

* Clear exclusive monitor on context switch

* Add SetThreadActivity, misc fixes

* Implement WaitForAddress and SignalToAddress svcs, misc fixes

* Misc fixes (on SetActivity and Arbiter), other tweaks

* Rebased

* Add missing null check

* Rename multicore key on config, fix UpdatePriorityInheritance

* Make scheduling data MLQs private

* nit: Ordering
2018-09-18 20:36:43 -03:00
gdkchanandGitHub 33e2810ef3 Fix d32s8 format on OGLEnumConverter (#420) 2018-09-18 13:27:12 -03:00
gdkchanandGitHub d6fba62f8a Misc fixes on the arena allocator (#364) 2018-09-18 12:28:28 -03:00
gdkchanandGitHub d4187aaa9d Allow "reinterpretation" of framebuffer/zeta formats (#418)
* (Re)Implement format reinterpretation, other changes

* Implement writeback to guest memory, some refactoring

* More refactoring, implement reinterpretation the old way again

* Clean up

* Some fixes on M2MF (old Dma engine), added partial support for P2MF, fix conditional ssy, add Z24S8 zeta format, other fixes

* nit: Formatting

* Address PR feedback
2018-09-18 01:30:35 -03:00
gdkchanandGitHub bec95cacc1 Ensure that buffers are available after a signal when GetReleasedBuffers is called (#369) 2018-09-18 00:12:47 -03:00
gdkchanandGitHub b549daed03 Fix exception throw message for unimpl texture formats (#398) 2018-09-01 18:51:51 -03:00
gdkchanandGitHub 35778afef9 Improve handling on QueryGet on the gpu (#397) 2018-09-01 11:54:56 -03:00
gdkchanandGitHub 9977acad0f Fix BinarySearchLt to return less than rather than less than or equal value (#372) 2018-08-23 01:54:59 -03:00