| Commit message (Collapse) | Author | Files | Lines |
|
|
|
Like the MOV32I and FMUL32I instructions.
This fixes a potential crash when using these instructions.
|
|
|
|
|
|
|
|
|
|
Only tiled->linear and linear->tiled copies that aren't offsetted are supported for now. Queries are not supported. Swizzled copies are not supported.
|
|
|
|
|
|
|
|
|
|
This instruction tells the GPU where the flow reconverges in a non-uniform control flow scenario, we can ignore this when generating GLSL code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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?
|
|
|
|
|
|
|
|
|
|
Long queries write a 128-bit result value to memory, which consists of a 64 bit query value and a 64 bit timestamp.
In this implementation, only select=Zero of the Crop unit is implemented, this writes the query sequence as a 64 bit value, and a 0u64 value for the timestamp, since we emulate an infinitely fast GPU.
This specific type was hwtested, but more rigorous tests should be performed in the future for the other types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The hardware allows for some rather complicated operations to be performed on the data during the copy, this is not implemented.
Only same-format same-size raw copies are implemented for now.
|
|
|
|
|
|
|
|
The rest are just macro shim registers.
|
|
It doesn't belong in the PFIFO handler.
|
|
|
|
|
|
|
|
|
|
This is based on research from nouveau. Many things are currently unknown and will require hwtests in the future.
This commit also stubs QueryMode::Write2 to do the same as Write. Nouveau code treats them interchangeably, it is currently unknown what the difference is.
|
|
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.
|
|
|
|
|
|
* gl_shader_gen: Support vertical/horizontal viewport flipping.
* fixup! gl_shader_gen: Support vertical/horizontal viewport flipping.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The Ryujinx macro interpreter and envydis were used as reference.
Macros are programs that are uploaded by the games during boot and can later be called by writing to their method id in a GPU command buffer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TODO: A shader may not use all of these textures at the same time, shader analysis should be performed to determine which textures are actually sampled.
|
|
|
|
|
|
Allow unswizzling of DXT1 textures.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This macro simply sets the current CB_ADDRESS to the texture buffer address for the input shader stage.
|
|
This macro binds the SSBO Info Buffer as the current ConstBuffer.
This buffer is usually bound to c0 during shader execution.
Games seem to use this macro instead of directly writing the address for some reason.
|
|
Writing to this method will cause the written value to be stored in the currently-set ConstBuffer plus CB_POS.
This method is usually used to upload uniforms or other shader-visible data.
|
|
|
|
|
|
|
|
|
|
|
|
It'll now set the CB_SIZE, CB_ADDRESS and CB_BIND registers when it's called.
Presumably this SetShader function is binding the constant shader uniforms to buffer 1 (c1[]).
|
|
Register 0xE24 is actually a macro that sets some shader parameters in the register structure.
Macros are uploaded to the GPU at startup and have their own ISA, we'll probably write an interpreter for this in the future.
|
|
|
|
|
|
Accumulate all arguments before calling the desired method.
Note: Maybe we should do the same for the NonIncreasing mode?
|
|
Shader address calculation depends on this value to some extent, we do not currently know what it being 0 entails.
|
|
|
|
This is the register that gets written after a game calls DrawArrays().
We should collect all GPU state and draw using our graphics API here.
|
|
|
|
Only QueryMode::Write is supported at the moment.
|
|
Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.
|
|
|