Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gl_shader_decompiler: Add identifier to decompiled code | ReinUsesLisp | 2020-03-09 | 1 | -2/+4 |
| | |||||
* | gl_shader_cache: Reduce registry consistency to debug assert | ReinUsesLisp | 2020-03-09 | 1 | -3/+1 |
| | | | | | Registry consistency is something that practically can't happen and it has a measurable runtime cost. Reduce it to a DEBUG_ASSERT. | ||||
* | shader/registry: Store graphics and compute metadata | ReinUsesLisp | 2020-03-09 | 1 | -12/+16 |
| | | | | | Store information GLSL forces us to provide but it's dynamic state in hardware (workgroup sizes, primitive topology, shared memory size). | ||||
* | video_core: Rename "const buffer locker" to "registry" | ReinUsesLisp | 2020-03-09 | 1 | -32/+33 |
| | |||||
* | gl_shader_cache: Rework shader cache and remove post-specializations | ReinUsesLisp | 2020-03-09 | 1 | -345/+158 |
| | | | | | Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it. | ||||
* | gl_state_tracker: Implement dirty flags for clip distances and shaders | ReinUsesLisp | 2020-02-28 | 1 | -0/+5 |
| | |||||
* | gl_rasterizer: Remove dirty flags | ReinUsesLisp | 2020-02-28 | 1 | -4/+0 |
| | |||||
* | Shader_IR: Store Bound buffer on Shader Usage | Fernando Sahmkow | 2020-01-24 | 1 | -1/+3 |
| | |||||
* | gl_shader_cache: Disable fastmath on Nvidia | ReinUsesLisp | 2020-01-21 | 1 | -0/+4 |
| | |||||
* | gl_shader_cache: Remove unused STAGE_RESERVED_UBOS constant | Lioncash | 2020-01-14 | 1 | -3/+0 |
| | | | | Given this isn't used, this can be removed entirely. | ||||
* | gl_shader_cache: std::move entries in CachedShader constructor | Lioncash | 2020-01-14 | 1 | -3/+4 |
| | | | | Avoids several reallocations of std::vector instances where applicable. | ||||
* | gl_shader_cache: Remove unused entries variable in BuildShader() | Lioncash | 2020-01-14 | 1 | -1/+0 |
| | | | | Eliminates a few unnecessary constructions of std::vectors. | ||||
* | gl_shader_cache: Update commentary for shared memory | ReinUsesLisp | 2019-12-21 | 1 | -9/+6 |
| | | | | | | | | Remove false commentary. Not dividing by 4 the size of shared memory is not a hack; it describes the number of integers, not bytes. While we are at it sort the generated code to put preprocessor lines on the top. | ||||
* | gl_shader_cache: Remove unused entry in GetPrimitiveDescription | ReinUsesLisp | 2019-12-21 | 1 | -11/+9 |
| | |||||
* | gl_shader_cache: Add missing new-line on emitted GLSL | ReinUsesLisp | 2019-12-11 | 1 | -2/+2 |
| | | | | | | | | | | | | | Add missing new-line. This caused shaders using local memory and shared memory to inject a preprocessor GLSL line after an expression (resulting in invalid code). It looked like this: shared uint smem[8];#define LOCAL_MEMORY_SIZE 16 It should look like this (addressed by this commit): shared uint smem[8]; \#define LOCAL_MEMORY_SIZE 16 | ||||
* | gl_shader_cache: Hack shared memory size | ReinUsesLisp | 2019-11-23 | 1 | -2/+3 |
| | | | | | | | | The current shared memory size seems to be smaller than what the game actually uses. This makes Nvidia's driver consistently blow up; in the case of FE3H it made it explode on Qt's SwapBuffers while SDL2 worked just fine. For now keep this hack since it's still progress over the previous hardcoded shared memory size. | ||||
* | gl_shader_cache: Remove dynamic BaseBinding specialization | ReinUsesLisp | 2019-11-23 | 1 | -36/+8 |
| | |||||
* | video_core: Unify ProgramType and ShaderStage into ShaderType | ReinUsesLisp | 2019-11-23 | 1 | -127/+100 |
| | |||||
* | gl_rasterizer: Bind graphics images to draw commands | ReinUsesLisp | 2019-11-23 | 1 | -0/+1 |
| | | | | | Images were not being bound to draw invocations because these would require a cache invalidation. | ||||
* | gl_shader_cache: Specialize local memory size for compute shaders | ReinUsesLisp | 2019-11-23 | 1 | -0/+5 |
| | | | | | Local memory size in compute shaders was stubbed with an arbitary size. This commit specializes local memory size from guest GPU parameters. | ||||
* | gl_shader_cache: Specialize shared memory size | ReinUsesLisp | 2019-11-23 | 1 | -0/+7 |
| | | | | | Shared memory was being declared with an undefined size. Specialize from guest GPU parameters the compute shader's shared memory size. | ||||
* | gl_shader_cache: Specialize shader workgroup | ReinUsesLisp | 2019-11-23 | 1 | -35/+28 |
| | | | | | | Drop the usage of ARB_compute_variable_group_size and specialize compute shaders instead. This permits compute to run on AMD and Intel proprietary drivers. | ||||
* | shader/texture: Deduce texture buffers from locker | ReinUsesLisp | 2019-11-23 | 1 | -12/+0 |
| | | | | | Instead of specializing shaders to separate texture buffers from 1D textures, use the locker to deduce them while they are being decoded. | ||||
* | Merge pull request #3081 from ReinUsesLisp/fswzadd-shuffles | Fernando Sahmkow | 2019-11-14 | 1 | -5/+14 |
|\ | | | | | shader: Implement FSWZADD and reimplement SHFL | ||||
| * | gl_shader_cache: Enable extensions only when available | ReinUsesLisp | 2019-11-08 | 1 | -6/+14 |
| | | | | | | | | Silence GLSL compilation warnings. | ||||
| * | gl_shader_decompiler: Reimplement shuffles with platform agnostic intrinsics | ReinUsesLisp | 2019-11-08 | 1 | -0/+1 |
| | | |||||
* | | gl_shader_cache: Fix locker constructors | ReinUsesLisp | 2019-11-08 | 1 | -2/+4 |
|/ | | | | Properly pass engine when a shader is being constructed from memory. | ||||
* | gl_shader_cache: Implement locker variants invalidation | ReinUsesLisp | 2019-10-25 | 1 | -27/+75 |
| | |||||
* | gl_shader_disk_cache: Store and load fast BRX | ReinUsesLisp | 2019-10-25 | 1 | -2/+17 |
| | |||||
* | gl_shader_decompiler: Move entries to a separate function | ReinUsesLisp | 2019-10-25 | 1 | -238/+251 |
| | |||||
* | Shader_Cache: setup connection of ConstBufferLocker | Fernando Sahmkow | 2019-10-25 | 1 | -16/+29 |
| | |||||
* | shader/image: Implement SULD and remove irrelevant code | ReinUsesLisp | 2019-09-21 | 1 | -8/+8 |
| | | | | | * Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array. | ||||
* | shader_ir/warp: Implement SHFL | ReinUsesLisp | 2019-09-17 | 1 | -1/+2 |
| | |||||
* | gl_shader_cache: Remove special casing for geometry shaders | ReinUsesLisp | 2019-09-04 | 1 | -59/+9 |
| | | | | | Now that ProgramVariants holds the primitive topology we no longer need to keep track of individual geometry shaders topologies. | ||||
* | video_core: Silent miscellaneous warnings (#2820) | Rodrigo Locatti | 2019-08-30 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | * texture_cache/surface_params: Remove unused local variable * rasterizer_interface: Add missing documentation commentary * maxwell_dma: Remove unused rasterizer reference * video_core/gpu: Sort member declaration order to silent -Wreorder warning * fermi_2d: Remove unused MemoryManager reference * video_core: Silent unused variable warnings * buffer_cache: Silent -Wreorder warnings * kepler_memory: Remove unused MemoryManager reference * gl_texture_cache: Add missing override * buffer_cache: Add missing include * shader/decode: Remove unused variables | ||||
* | Merge pull request #2742 from ReinUsesLisp/fix-texture-buffers | bunnei | 2019-08-29 | 1 | -2/+6 |
|\ | | | | | gl_texture_cache: Miscellaneous texture buffer fixes | ||||
| * | gl_shader_cache: Fix newline on buffer preprocessor definitions | ReinUsesLisp | 2019-07-18 | 1 | -2/+6 |
| | | |||||
* | | shader_ir: Implement VOTE | ReinUsesLisp | 2019-08-21 | 1 | -1/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement VOTE using Nvidia's intrinsics. Documentation about these can be found here https://developer.nvidia.com/reading-between-threads-shader-intrinsics Instead of using portable ARB instructions I opted to use Nvidia intrinsics because these are the closest we have to how Tegra X1 hardware renders. To stub VOTE on non-Nvidia drivers (including nouveau) this commit simulates a GPU with a warp size of one, returning what is meaningful for the instruction being emulated: * anyThreadNV(value) -> value * allThreadsNV(value) -> value * allThreadsEqualNV(value) -> true ballotARB, also known as "uint64_t(activeThreadsNV())", emits VOTE.ANY Rd, PT, PT; on nouveau's compiler. This doesn't match exactly to Nvidia's code VOTE.ALL Rd, PT, PT; Which is emulated with activeThreadsNV() by this commit. In theory this shouldn't really matter since .ANY, .ALL and .EQ affect the predicates (set to PT on those cases) and not the registers. | ||||
* | | Merge pull request #2734 from ReinUsesLisp/compute-shaders | bunnei | 2019-07-22 | 1 | -33/+117 |
|\ \ | | | | | | | gl_rasterizer: Implement compute shaders | ||||
| * | | gl_shader_cache: Fix clang-format issues | ReinUsesLisp | 2019-07-16 | 1 | -2/+1 |
| | | | |||||
| * | | gl_shader_cache: Address review commentaries | ReinUsesLisp | 2019-07-15 | 1 | -7/+4 |
| | | | |||||
| * | | gl_shader_cache: Address CI issues | ReinUsesLisp | 2019-07-15 | 1 | -1/+2 |
| | | | |||||
| * | | gl_rasterizer: Implement compute shaders | ReinUsesLisp | 2019-07-15 | 1 | -35/+122 |
| |/ | |||||
* / | Maxwell3D: Rework the dirty system to be more consistant and scaleable | Fernando Sahmkow | 2019-07-17 | 1 | -1/+1 |
|/ | |||||
* | Merge pull request #2695 from ReinUsesLisp/layer-viewport | Fernando Sahmkow | 2019-07-15 | 1 | -2/+5 |
|\ | | | | | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders | ||||
| * | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders | ReinUsesLisp | 2019-07-08 | 1 | -2/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements gl_ViewportIndex and gl_Layer in vertex and geometry shaders. In the case it's used in a vertex shader, it requires ARB_shader_viewport_layer_array. This extension is available on AMD and Nvidia devices (mesa and proprietary drivers), but not available on Intel on any platform. At the moment of writing this description I don't know if this is a hardware limitation or a driver limitation. In the case that ARB_shader_viewport_layer_array is not available, writes to these registers on a vertex shader are ignored, with the appropriate logging. | ||||
* | | shader_ir: propagate shader size to the IR | Fernando Sahmkow | 2019-07-09 | 1 | -7/+15 |
|/ | |||||
* | Merge pull request #2601 from FernandoS27/texture_cache | Zach Hilman | 2019-07-05 | 1 | -35/+56 |
|\ | | | | | Implement a new Texture Cache | ||||
| * | texture_cache: Address Feedback | Fernando Sahmkow | 2019-07-05 | 1 | -2/+4 |
| | | |||||
| * | texture_cache: Style and Corrections | Fernando Sahmkow | 2019-06-21 | 1 | -1/+1 |
| | | |||||
| * | shader_cache: Correct versioning and size calculation. | Fernando Sahmkow | 2019-06-21 | 1 | -1/+6 |
| | | |||||
| * | gl_shader_decompiler: Implement image binding settings | ReinUsesLisp | 2019-06-21 | 1 | -0/+4 |
| | | |||||
| * | gl_rasterizer: Track texture buffer usage | ReinUsesLisp | 2019-06-21 | 1 | -34/+44 |
| | | |||||
* | | gl_shader_cache: Make CachedShader constructor private | Zach Hilman | 2019-07-04 | 1 | -2/+2 |
| | | | | | | | | Fixes missing review comments introduced. | ||||
* | | gl_shader_cache: Use static constructors for CachedShader initialization | ReinUsesLisp | 2019-06-08 | 1 | -42/+34 |
|/ | |||||
* | gl_shader_cache: Store a system class and drop global accessors | ReinUsesLisp | 2019-05-30 | 1 | -7/+8 |
| | |||||
* | gl_shader_cache: Add commentaries explaining the intention in shaders creation | ReinUsesLisp | 2019-05-30 | 1 | -0/+2 |
| | |||||
* | gl_shader_cache: Flip if condition in GetStageProgram to reduce indentation | ReinUsesLisp | 2019-05-30 | 1 | -25/+26 |
| | |||||
* | gl_shader_gen: Always declare extensions after the version declaration | ReinUsesLisp | 2019-05-27 | 1 | -1/+2 |
| | | | | | This addresses a bug on geometry shaders where code was being written before all #extension declarations were done. Ref to #2523 | ||||
* | gl_shader_cache: Fix clang strict standard build issues | ReinUsesLisp | 2019-05-21 | 1 | -3/+4 |
| | |||||
* | gl_shader_cache: Use shared contexts to build shaders in parallel | ReinUsesLisp | 2019-05-21 | 1 | -34/+82 |
| | |||||
* | video_core/renderer_opengl/gl_shader_cache: Correct member initialization order | Lioncash | 2019-05-10 | 1 | -1/+1 |
| | | | | Silences a -Wreorder warning. | ||||
* | Re added new lines at the end of files | FreddyFunk | 2019-04-23 | 1 | -1/+1 |
| | |||||
* | gl_shader_disk_cache: Use VectorVfsFile for the virtual precompiled shader cache file | unknown | 2019-04-23 | 1 | -1/+11 |
| | |||||
* | Merge pull request #2383 from ReinUsesLisp/aoffi-test | bunnei | 2019-04-23 | 1 | -27/+27 |
|\ | | | | | gl_shader_decompiler: Disable variable AOFFI on unsupported devices | ||||
| * | gl_shader_decompiler: Use variable AOFFI on supported hardware | ReinUsesLisp | 2019-04-14 | 1 | -27/+27 |
| | | |||||
* | | Document unsafe versions and add BlockCopyUnsafe | Fernando Sahmkow | 2019-04-16 | 1 | -6/+7 |
| | | |||||
* | | Use ReadBlockUnsafe for Shader Cache | Fernando Sahmkow | 2019-04-16 | 1 | -5/+7 |
|/ | |||||
* | Merge pull request #2354 from lioncash/header | bunnei | 2019-04-10 | 1 | -0/+1 |
|\ | | | | | video_core/texures/texture: Remove unnecessary includes | ||||
| * | video_core/texures/texture: Remove unnecessary includes | Lioncash | 2019-04-06 | 1 | -0/+1 |
| | | | | | | | | | | | | Nothing in this header relies on common_funcs or the memory manager. This gets rid of reliance on indirect inclusions in the OpenGL caches. | ||||
* | | Merge pull request #2300 from FernandoS27/null-shader | bunnei | 2019-04-07 | 1 | -0/+4 |
|\ \ | |/ |/| | shader_cache: Permit a Null Shader in case of a bad host_ptr. | ||||
| * | Permit a Null Shader in case of a bad host_ptr. | Fernando Sahmkow | 2019-04-07 | 1 | -0/+4 |
| | | |||||
* | | Merge pull request #2299 from lioncash/maxwell | bunnei | 2019-04-04 | 1 | -2/+0 |
|\ \ | | | | | | | gl_shader_manager: Remove reliance on a global accessor within MaxwellUniformData::SetFromRegs() | ||||
| * | | gl_shader_manager: Remove unnecessary gl_shader_manager inclusion | Lioncash | 2019-03-28 | 1 | -2/+0 |
| |/ | | | | | | | | | | | | | | | | | This isn't used at all in the OpenGL shader cache, so we can remove it's include here, meaning one less file needs to be recompiled if any changes ever occur within that header. core/memory.h is also not used within this file at all, so we can remove it as well. | ||||
* / | video_core: Amend constructor initializer list order where applicable | Lioncash | 2019-03-27 | 1 | -6/+6 |
|/ | | | | | | | Specifies the members in the same order that initialization would take place in. This also silences -Wreorder warnings. | ||||
* | gpu: Move GPUVAddr definition to common_types. | bunnei | 2019-03-21 | 1 | -2/+2 |
| | |||||
* | video_core: Refactor to use MemoryManager interface for all memory access. | bunnei | 2019-03-16 | 1 | -20/+17 |
| | | | | | | | | | | | # Conflicts: # src/video_core/engines/kepler_memory.cpp # src/video_core/engines/maxwell_3d.cpp # src/video_core/morton.cpp # src/video_core/morton.h # src/video_core/renderer_opengl/gl_global_cache.cpp # src/video_core/renderer_opengl/gl_global_cache.h # src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | ||||
* | gpu: Use host address for caching instead of guest address. | bunnei | 2019-03-15 | 1 | -19/+24 |
| | |||||
* | gl_shader_disk_cache: Use unordered containers | ReinUsesLisp | 2019-02-07 | 1 | -3/+3 |
| | |||||
* | gl_shader_cache: Fixup GLSL unique identifiers | ReinUsesLisp | 2019-02-07 | 1 | -2/+2 |
| | |||||
* | gl_shader_cache: Link loading screen with disk shader cache load | ReinUsesLisp | 2019-02-07 | 1 | -3/+26 |
| | |||||
* | gl_shader_cache: Set GL_PROGRAM_SEPARABLE to dumped shaders | ReinUsesLisp | 2019-02-07 | 1 | -0/+1 |
| | | | | | | i965 (and probably all mesa drivers) require GL_PROGRAM_SEPARABLE when using glProgramBinary. This is probably required by the standard but it's ignored by permisive proprietary drivers. | ||||
* | gl_shader_disk_cache: Pass core system as argument and guard against games without title ids | ReinUsesLisp | 2019-02-07 | 1 | -1/+2 |
| | |||||
* | gl_shader_disk_cache: Address miscellaneous feedback | ReinUsesLisp | 2019-02-07 | 1 | -3/+3 |
| | |||||
* | gl_shader_disk_cache: Pass return values returning instead of by parameters | ReinUsesLisp | 2019-02-07 | 1 | -7/+5 |
| | |||||
* | gl_shader_disk_cache: Save GLSL and entries into the precompiled file | ReinUsesLisp | 2019-02-07 | 1 | -32/+39 |
| | |||||
* | gl_shader_cache: Refactor to support disk shader cache | ReinUsesLisp | 2019-02-07 | 1 | -105/+345 |
| | |||||
* | rasterizer_interface: Add disk cache entry for the rasterizer | ReinUsesLisp | 2019-02-07 | 1 | -0/+2 |
| | |||||
* | video_core: Assert on invalid GPU to CPU address queries | ReinUsesLisp | 2019-02-03 | 1 | -2/+4 |
| | |||||
* | gl_shader_cache: Use explicit bindings | ReinUsesLisp | 2019-01-30 | 1 | -63/+83 |
| | |||||
* | gl_rasterizer: Implement global memory management | ReinUsesLisp | 2019-01-30 | 1 | -3/+15 |
| | |||||
* | video_core: Rename glsl_decompiler to gl_shader_decompiler | ReinUsesLisp | 2019-01-15 | 1 | -1/+1 |
| | |||||
* | video_core: Replace gl_shader_decompiler | ReinUsesLisp | 2019-01-15 | 1 | -2/+6 |
| | |||||
* | gl_shader_cache: Use dirty flags for shaders | ReinUsesLisp | 2019-01-07 | 1 | -1/+5 |
| | |||||
* | gl_shader_cache: Dehardcode constant in CalculateProgramSize() | Lioncash | 2018-12-11 | 1 | -2/+2 |
| | | | | This constant is related to the size of the instruction. | ||||
* | gl_shader_cache: Resolve truncation compiler warning | Lioncash | 2018-12-11 | 1 | -1/+1 |
| | | | | | The previous code would cause a warning, as it was truncating size_t (64-bit) to a u32 (32-bit) implicitly. | ||||
* | Implemented a shader unique identifier. | Fernando Sahmkow | 2018-12-09 | 1 | -0/+45 |
| | |||||
* | shader_cache: Only lock covered instructions. | Markus Wick | 2018-11-20 | 1 | -0/+1 |
| | |||||
* | Merge pull request #1669 from ReinUsesLisp/fixup-gs | bunnei | 2018-11-11 | 1 | -2/+6 |
|\ | | | | | gl_shader_decompiler: Guard out of bound geometry shader input reads | ||||
| * | gl_shader_decompiler: Guard out of bound geometry shader input reads | ReinUsesLisp | 2018-11-10 | 1 | -2/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | Geometry shaders follow a pattern that results in out of bound reads. This pattern is: - VSETP to predicate - Use that predicate to conditionally set a register a big number - Use the register to access geometry shaders At the time of writing this commit I don't know what's the intent of this number. Some drivers argue about these out of bound reads. To avoid this issue, input reads are guarded limiting reads to the highest posible vertex input of the current topology (e.g. points to 1 and triangles to 3). | ||||
* | | rasterizer_cache: Remove reliance on the System singleton | Lioncash | 2018-11-08 | 1 | -1/+3 |
|/ | | | | | | Rather than have a transparent dependency, we can make it explicit in the interface. This also gets rid of the need to put the core include in a header. | ||||
* | video_core: Move OpenGL specific utils to its renderer | ReinUsesLisp | 2018-10-29 | 1 | -2/+3 |
| | |||||
* | gl_shader_decompiler: Implement geometry shaders | ReinUsesLisp | 2018-10-07 | 1 | -5/+29 |
| | |||||
* | Added glObjectLabels for renderdoc for textures and shader programs (#1384) | David | 2018-09-23 | 1 | -0/+2 |
| | | | | | | | | * Added glObjectLabels for renderdoc for textures and shader programs * Changed hardcoded "Texture" name to reflect the texture type instead * Removed string initialize | ||||
* | Port #4182 from Citra: "Prefix all size_t with std::" | fearlessTobi | 2018-09-15 | 1 | -3/+3 |
| | |||||
* | video_core: fixed arithmetic overflow warnings & improved code style | Patrick Elsässer | 2018-09-09 | 1 | -4/+4 |
| | | | | | | | | - Fixed all warnings, for renderer_opengl items, which were indicating a possible incorrect behavior from integral promotion rules and types larger than those in which arithmetic is typically performed. - Added const for variables where possible and meaningful. - Added constexpr where possible. | ||||
* | gl_shader_cache: Use an u32 for the binding point cache. | Markus Wick | 2018-09-04 | 1 | -8/+8 |
| | | | | | | | The std::string generation with its malloc and free requirement was a noticeable overhead. Also switch to an ordered_map to avoid the std::hash call. As those maps usually have a size of two elements, the lookup time shall not matter. | ||||
* | gl_renderer: Cache textures, framebuffers, and shaders based on CPU address. | bunnei | 2018-08-31 | 1 | -11/+7 |
| | |||||
* | gl_shader_cache: Remove unused program_code vector in GetShaderAddress() | Lioncash | 2018-08-28 | 1 | -2/+1 |
| | | | | | | | | Given std::vector is a type with a non-trivial destructor, this variable cannot be optimized away by the compiler, even if unused. Because of that, something that was intended to be fairly lightweight, was actually allocating 32KB and deallocating it at the end of the function. | ||||
* | renderer_opengl: Implement a new shader cache. | bunnei | 2018-08-28 | 1 | -0/+131 |