| Commit message (Collapse) | Author | Files | Lines |
|
|
|
correct trailing white spaces
Delete tabs
correct placement
Add RG16F & RG16UI & RG16I & RG16S PixelFormats
Return correct data according to changes done previously
correct PixelFormat declaration
correct coding style error
correct coding style error part 2
correct RG16S Declaration error
correct alignment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is just the named constant that OpenGL provides, so we can use that
instead of using a literal -1
|
|
We can avoid heap allocations here by just using a std::string_view
instead of performing unnecessary copying of the string data.
|
|
We can just assign to the members directly in these cases.
|
|
|
|
|
|
|
|
|
|
This should be returning void, not a std::string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We don't need to toss away the Subroutine instance after the find() call
and reconstruct another instance with the same data right after it.
Particularly give Subroutine contains a std::set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This was just a linker error waiting to happen.
|
|
This makes it match its const qualified equivalent.
|
|
Compresses a few namespace specifiers to be more compact.
|
|
|
|
While we're at it, amend the loop variable type to be the same width as
that returned by the .size() call.
|
|
Ensures that no identifiers are being hidden, which also reduces
compiler warnings.
|
|
This adds nothing from a behavioral point of view, and can inhibit the
move constructor/RVO
|
|
|
|
This would result in a lot of allocations and related object
construction, just to toss it all away immediately after the call.
These are definitely not intentional, and it was intended that all of
these should have been accessing the static function GetInstance()
through the name itself, not constructed instances.
|
|
|
|
|
|
|
|
|
|
|
|
The GPU ignores that register when clearing, but OpenGL obeys the glDepthMask parameter, so we set the depth mask to GL_TRUE when clearing the depth buffer. It will be restored to the correct value automatically on the next draw call.
|
|
|
|
- When VertexA shader stage is enabled, we combine with VertexB program to make a single Vertex Shader stage.
|
|
|
|
|
|
|
|
- Fixes a regression with Binding of Isaac.
|
|
Note: Our version of glad exports GL_COMPRESSED_RGBA_BPTC_UNORM as GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, maybe it's time we update it.
|
|
These seem to be just a valid as the GL token values. Thanks @ReinUsesLisp
This restores graphical output to Disgaea 5
|
|
It's similar to the FMNMX instruction but it works on integers.
|
|
It's implemented via the GLSL 'roundEven()' function.
|
|
It is unknown at this moment if we actually need to do something with these instructions or if the GLSL compiler takes care of that for us.
|
|
Both signed and unsigned variants.
|
|
|
|
It's similar to the isetp and fsetp instructions but it works on predicates instead.
|
|
|
|
OpenGL's default behavior is already correct when the GPU is configured to flip the triangles.
This fixes 1-2 Switch's splash screen.
|
|
Don't try to configure the color buffer if it is not being cleared, it may not be completely valid at this point.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This fixes Stardew Valley.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gl_rasterizer_cache: Improved cache management based on Citra's implementation.
gl_surface_cache: Add some docstrings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Like the MOV32I and FMUL32I instructions.
This fixes a potential crash when using these instructions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This corrects the invalid position values in some games when doing attribute-less rendering.
|
|
This should help a bit with GPU performance once we're GPU-bound.
|
|
|
|
|
|
This instruction tells the GPU where the flow reconverges in a non-uniform control flow scenario, we can ignore this when generating GLSL code.
|
|
|
|
|
|
Only independent blending on render target 0 is implemented for now.
This fixes the elongated squids in Splatoon 2's boot screen.
|
|
|
|
This fixes issues with retrieving non-block-aligned tiled compressed textures from the cache.
|
|
This fixes the flip_viewport uniform having invalid values when drawing.
|
|
This should fix the bug with the vs_config UBO being uninitialized during shader execution.
|
|
|
|
This avoids the problem of only copying a tiny piece of the textures when they are compressed.
|
|
We now use glCopyImageSubData, this should avoid errors with trying to attach a compressed texture as a framebuffer's color attachment and then blitting to it.
Maybe in the future we can change this to glCopyTextureSubImage which only requires GL_ARB_direct_state_access.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All tested games that use a single texture show no regression.
Only Texture2D textures are supported right now, each shader gets its own "tex_fs/vs/gs" sampler array to maintain independent textures between shader stages, the textures themselves are reused if possible.
|
|
|
|
|
|
|
|
They're not compressed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is how nouveau calculates the viewport width and height. For some reason some games set 0xFFFF in the VIEWPORT_HORIZ and VIEWPORT_VERT registers, maybe those are a misnomer and actually refer to something else?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can specify a predicate in the fset instruction:
Result = ((Value1 Comp Value2) OP P0) ? 1.0 : 0.0;
|
|
You can specify three predicates in an fsetp instruction:
P1 = (Value1 Comp Value2) OP P0;
P2 = !(Value1 Comp Value2) OP P0;
|
|
|
|
|
|
The stream buffer is where all the vertex data is copied, some games require this to be much bigger than the 4 MB we used to have.
|
|
|
|
This makes the formatting expectations more obvious (e.g. any zero padding specified
is padding that's entirely dedicated to the value being printed, not any pretty-printing
that also gets tacked on).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This instruction is similar to the FSETP instruction, but it doesn't set a predicate, it sets the destination register to 1.0 if the condition holds, and 0 otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The vertex arrays will be copied to the stream buffer one after the other, and the attributes will be set using the ARB_vertex_attrib_binding extension.
yuzu now thus requires OpenGL 4.3 or the ARB_vertex_attrib_binding extension.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Each predicated instruction will be wrapped in an `if (predicate) { instruction_body; }` in the GLSL, where `predicate` is one of the predicate boolean variables previously set by fsetp.
|
|
Predicate variables are now added to the generated shader code in the form of 'pX' where X is the predicate id.
These predicate variables are initialized to false on shader startup and are set via the fsetp instructions.
TODO:
* Not all the comparison types are implemented.
* Only the single-predicate version is implemented.
|
|
|
|
Standard library containers may use std::move_if_noexcept to perform
move operations. If a move cannot be performed under these
circumstances, then a copy is attempted. Given we only intend for these
types to be move-only this can be somewhat problematic. By defining
these to be noexcept we prevent cases where copies may be attempted.
|
|
Prevents implicit conversions and scope pollution.
|
|
|
|
The 'sched' instruction has a very convoluted encoding, but fortunately it seems to only appear on a fixed interval (once every 4 instructions).
|
|
C++17 adds clamp() to the standard library, so we can remove ours in
favor of it.
|
|
C++17 has non-member size() which we can just call where necessary.
|
|
|
|
This function doesn't need to take ownership of the string data being
given to it, considering all we do is append the characters to the
internal string instance.
Instead, use a string view to simply reference the string data without
any potential heap allocation.
Now anything that is a raw const char* won't need to be converted to a
std::string before appending.
|
|
Avoids constructing a std::string just to append a newline character
|
|
Avoids constructing a std::string just to append a character.
|
|
The interface of std::string already lets us append N copies of a
character to an existing string.
|
|
|
|
It will now save the coords before writing the outputs in a subscope.
|
|
|
|
|
|
* gl_shader_gen: Support vertical/horizontal viewport flipping.
* fixup! gl_shader_gen: Support vertical/horizontal viewport flipping.
|
|
For now only the UNORM type is supported.
|
|
|
|
|
|
|
|
TODO: The way we handle cached formats must change, framebuffer and texture formats are too different to keep them in the same place.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This clamp mode was removed from OpenGL as of 3.1, we can emulate it by using GL_CLAMP_TO_BORDER to get the border color of the texture, and then manually sampling the edge to mix them in the fragment shader.
|
|
|
|
|
|
|
|
The bindpoints will now be dynamically calculated based on the number of buffers used by the previous shader stage.
|
|
|
|
|
|
|
|
We're going to need the shader generator to give us a mapping of the actual used const buffers to properly bind them to the shader.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Tested with Puyo Puyo Tetris and Cave Story+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Each Maxwell shader stage can have an arbitrary number of textures, but we're limited to a certain number in OpenGL. We try to only use the minimum amount of host textures by not keeping a 1:1 relation between guest texture ids and host texture ids, ie, guest texture id 8 can be host texture id 0 if it's the only texture used in the guest shader program.
This mapping will have to be passed to the shader decompiler so it can rewrite the texture accesses.
|
|
|
|
It will now use the UnswizzleTexture function instead of the MortonCopyPixels128, which doesn't seem to work for textures.
|
|
|
|
Compressed texture formats like DXT1, DXT2, DXT3, etc will use this to ease the load on the CPU.
|
|
|
|
We're only left with RGB8 and DXT1 for now. More will be added as they are needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this is a rebasing error from #2792. It doesn't affect much though, because the later more Apply() call fixes/hides it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
While debugging the software renderer implementation, it was noticed
that this is actually exactly what the hardware does, upgrading the
status of this "hack" to being a proper implementation. And there was
much rejoicing.
|
|
|
|
|
|
|
|
video_core didn't even properly use them, and they were the source of
many otherwise-unnecessary dependencies from core to video_core.
|
|
|
|
Current order of operations (rotate then normalize) seems to produce a
lot more distortion than normalizing and then rotating. This makes Citra
results match pretty closesly with hardware, and indicates that hardware
may also be using lerp instead of slerp to interpolate the quaternions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also move the implementation of CurrentConfig to the cpp file.
|
|
|
|
1. removed zl, zr and c-stick from HID::PadState. They are handled by IR, not HID
2. removed button handling in EmuWindow
3. removed key_map
4. cleanup #include
|
|
Now based on std::chrono, and also works in terms of emulated time
instead of frames, so we can in the future frame-limit even when the
display is disabled, etc.
The frame limiter can also be enabled along with v-sync now, which
should be useful for those with displays running at more than 60 Hz.
|
|
More ergonomic to use and will be required for upcoming changes.
|
|
|
|
|
|
|
|
This copy was left behind when the shader generation code was moved to a
separate file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A few registers had names such as "count" or "number" when they actually
contained the maximum (that is, count - 1). This can easily lead to hard
to notice off by one errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Removes circular dependences (common should not depend on core)
|
|
|
|
|
|
This OpenGL call synchronize the worker thread of the nvidia blob.
It can be verified on linux with the __GL_THREADED_OPTIMIZATIONS=1 environment variable.
Those errors should not happen on tested drivers.
It was used as a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=94148
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #2246, #2261
|
|
|
|
|
|
|
|
|
|
Also minor style changes
|
|
Allows users to choose a single screen layout or a large screen layout.
Adds a configuration option to change the prominent screen.
|
|
Fixes #1938
|
|
|
|
|
|
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
On SDL2 this allows it to use SDL_GL_GetProcAddress() instead of the
default function loader, and fixes a crash when using apitrace with an
EGL context.
On Qt we will need to migrate from QGLWidget to QOpenGLWidget and
QOpenGLContext before we can use gladLoadGLLoader() instead of
gladLoadGL(), since the former doesn’t expose a function loader.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This has been entirely superseded by MicroProfile. The rest of the code
can go when a simpler frametime/FPS meter is added to the GUI.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Our code did not handle this well, causing random crashes in some
situations.
|
|
Add error popup when citra initialization failed
|
|
This has been confirmed on hardware. Fixes Etrian Odyssey IV.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Also implement D0 LUT enable.
|
|
|
|
|
|
- No functional difference.
|
|
|
|
|
|
|
|
- Gets us LUT interpolation for free.
- Some older Intel GPU drivers did not support the big UBOs needed to store the LUTs.
|
|
|
|
|
|
|
|
|
|
|
|
The nVidia driver is *extremely* spammy on this category, sending a
message on every buffer or texture upload, slowing down the emulator and
making the log useless.
|
|
|
|
This removes explicit checks sprinkled all over the codebase to instead
just have the SW rasterizer expose an implementation with no-ops for
most operations.
|
|
|
|
|
|
|
|
|
|
This was discovered and verified by @fincs. The tev combiner buffer
actually lags behind by one stage, meaning stage 1 reads the initial
color, stage 2 reads stage 0's output, and so on.
Fixes character portraits in Fire Emblem: Awakening and world textures
in Zelda: ALBW. Closes #1140.
|
|
|
|
The support for GL_ARB_explicit_uniform_location is not that good
(53% according to http://feedback.wildfiregames.com/report/opengl/feature/GL_ARB_explicit_uniform_location).
This fix the shader compilation on Intel HD 4000 (#1222).
|
|
|
|
This allows the driver to communicate errors, warnings and improvement
suggestions about our usage of the API.
|
|
|
|
- Also add a comment to AppendColorCombiner.
|
|
|
|
|
|
- Includes a check to confirm no hash collisions.
|
|
- Fixes uniform issue on AMD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Alpha testing is not done with float32 precision, this makes the HW renderer match the SW renderer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #978
|
|
|
|
|
|
The main advantage of switching to glad from glLoadGen is that, apart
from being actively maintained, it supports a customizable entrypoint
loader function, which makes it possible to also support OpenGL ES.
|
|
|
|
This brings goodies such as a configurable user interface and
multi-threaded timeline view.
|
|
Reported here https://communities.intel.com/message/324464
|
|
|
|
|
|
|
|
|
|
- Also renames "vertex_shader.*" to "shader_interpreter.*"
|
|
If an OpenGL object is created, bound to a binding using the state
tracker, and then destroyed, a newly created object can be assigned the
same numeric handle by OpenGL. However, even though it is a new object,
and thus needs to be bound to the binding again, the state tracker
compared the current and previous handles and concluded that no change
needed to be made, leading to failure to bind objects in certain cases.
This manifested as broken text in VVVVVV, which this commit fixes along
with similar texturing problems in other games.
|
|
All uses of this field where it's false can just set the texture id to 0
instead.
|
|
|
|
The functions are so simple that having them separate only bloats the
code and hinders optimization.
|
|
|
|
In OpenGL 3, texturing is always enabled, and this call is invalid.
While it produced no effect in the rest of the execution, it wouldn't
have the intended effect of disabling texturing for that unit. Instead
bind a null texture to the unit.
|
|
|
|
|
|
This is exposed in the GUI as a new "CiTrace Recording" widget.
Playback is implemented by a standalone 3DS homebrew application (which only runs reliably within Citra currently; on an actual 3DS it will often crash still).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- This is a workaround until we support fragment lighting.
|
|
|
|
|
|
The file only contained vector manipulation code, and such widely-useable code doesn't belong in video_core.
|
|
|
|
|
|
|
|
|
|
|
|
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
|
|
|
|
|
|
The background color can be seen at the sides of the bottom screen or when the window is wider than normal.
|
|
|
|
|
|
|
|
|
|
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
|
|
Hardware testing determined that the GSP processes shared memory
framebuffer update info even when no memory transfer or filling GX
commands are used. They are now updated on every interrupt, which isn't
confirmed correct but matches hardware behaviour more closely.
This also reverts the hack introduced in #404. It made a few games
behave better, but I believe it's incorrect and also breaks other games.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The view is scaled to be as large as possible, without changing the aspect, within the bounds of the window.
On "retina" displays, or other displays where window units != pixels, the view should no longer draw incorrectly.
|
|
This was automated using `clang-modernize`.
|
|
This prevents a crash when the buffer size returned by the driver is 0,
in which case no space is allocated to store even the NULL byte and
glGetShaderInfoLog errors out.
Thanks to @Relys for the bug report.
|
|
The OpenGL renderer has been revised, with the following changes:
- Initialization and rendering have been refactored to reduce the number of
redundant objects used.
- Framebuffer rotation is now done directly, using texture mapping.
- Vertex coordinates are now given in pixels, and the projection matrix
isn't hardcoded anymore.
|
|
|
|
Also make destructor virtual so that instances are properly destructed.
|
|
|
|
|
|
This should fix the GL loading errors that occur in some drivers due to
the use of deprecated functions by GLEW. Side benefits are more accurate
auto-completion (deprecated function and symbols don't exist) and faster
pointer loading (less entrypoints to load). In addition it removes an
external library depency, simplifying the build system a bit and
eliminating one set of binary libraries for Windows.
|
|
|
|
|
|
Screen contents are now displayed using textured quads. This can be updated to expose an FBO once an OpenGL backend for when Pica rendering is being worked on. That FBO's texture can then be applied to the quads.
Previously, FBO blitting was used in order to display screen contents, which did not work on OS X. The new textured quad approach is less of a compatibility risk.
|
|
This cleans up the mess that address reading/writing had become and makes the code a *lot* more sensible.
This adds a physical<->virtual address converter to mem_map.h. For further accuracy, we will want to properly extend this to support a wider range of address regions. For now, this makes simply homebrew applications work in a good manner though.
|
|
While it was some nice and fancy template usage, it ultimately had many practical issues regarding length of involved expressions under regular usage as well as common code completion tools not being able to handle the structures.
Instead, we now use a more conventional approach which is a lot more clean to use.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Only Rect is in the namespace for now; the rest of common should be added in the future
|
|
Less calculations + fix
|
|
|
|
|
|
|
|
Somewhere along the line an OSX header had already taken the name Rect.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|