| Age | Commit message (Collapse) | Author |
|
|
|
Pass instanced state of a draw invocation as an argument instead of
having two separate virtual methods.
|
|
|
|
Vulkan's VertexIndex and InstanceIndex don't match with hardware. This
is because Nvidia implements gl_VertexID and gl_InstanceID. The math
that relates these is:
gl_VertexIndex = gl_BaseVertex + gl_VertexID
gl_InstanceIndex = gl_InstanceIndex + gl_InstanceID
To emulate it using what Vulkan's SPIR-V offers (the *Index variants)
this commit substracts gl_Base* from gl_*Index to obtain the OpenGL and
hardware's equivalent.
|
|
Removes bounds checking from "texceptions" instances.
|
|
yuzu: Implement Vulkan frontend
|
|
Partially implement Indexed samplers in general and specific code in GLSL
|
|
Adds a Qt and SDL2 frontend for Vulkan. It also finishes the missing
bits on Vulkan initialization.
|
|
|
|
ATOM operates atomically on global memory. For now only add ATOM.ADD
since that's what was found in commercial games.
This asserts for ATOM.ADD.S32 (handling the others as unimplemented),
although ATOM.ADD.U32 shouldn't be any different.
This change forces us to change the default type on SPIR-V storage
buffers from float to uint. We could also alias the buffers, but it's
simpler for now to just use uint. While we are at it, abstract the code
to avoid repetition.
|
|
|
|
|
|
|
|
Some games like The Legend of Zelda: Breath of the Wild assign
render targets without writing them from the fragment shader. This
generates Vulkan validation errors, so silence these I previously
introduced a commit to set "vec4(0, 0, 0, 1)" for these attachments. The
problem is that this is not what games expect. This commit reverts that
change.
|
|
vk_blit_screen: Initial implementation
|
|
|
|
vk_shader_decompiler: Implement UAtomicAdd (ATOMS) on SPIR-V
|
|
vk_graphics_pipeline: Set front facing properly
|
|
This abstraction takes care of presenting accelerated and
non-accelerated or "framebuffer" images to the Vulkan swapchain.
|
|
vk_rasterizer: Implement Vulkan's rasterizer
|
|
Also updates sirit to include atomic instructions.
|
|
Front face was being forced to a certain value when cull face is
disabled. Set a default value on initialization and drop the forcefully
set front facing value with culling disabled.
|
|
shader/memory: Implement ATOMS.ADD.U32
|
|
|
|
This abstraction is Vulkan's equivalent to OpenGL's rasterizer. It takes
care of joining all parts of the backend and rendering accordingly on
demand.
|
|
|
|
vk_texture_cache: Implement generic texture cache on Vulkan
|
|
|
|
|
|
Co-Authored-By: MysticExile <30736337+MysticExile@users.noreply.github.com>
|
|
maxwell_to_vk: Implement GL_CLAMP hacking Nvidia's driver
|
|
It currently ignores PBO linearizations since these should be dropped as
soon as possible on OpenGL.
|
|
Comment hardcoded SPIR-V modules.
|
|
Nvidia's driver defaults invalid enumerations to GL_CLAMP. Vulkan
doesn't expose GL_CLAMP through its API, but we can hack it on Nvidia's
driver using the internal driver defaults.
|
|
This currently only supports quad arrays and u8 indices.
In the future we can remove quad arrays with a table written from the
CPU, but this was used to bootstrap the other passes helpers and it
was left in the code.
The blob code is generated from the "shaders/" directory. Read the
instructions there to know how to generate the SPIR-V.
|
|
|
|
Given a pipeline key, this cache returns a pipeline abstraction (for
graphics or compute).
|
|
This abstractio represents the state of the 3D engine at a given draw.
Instead of changing individual bits of the pipeline how it's done in
APIs like D3D11, OpenGL and NVN; on Vulkan we are forced to put
everything together into a single, immutable object.
It takes advantage of the few dynamic states Vulkan offers.
|
|
This abstraction represents a Vulkan compute pipeline.
|
|
This function allows us to share code between compute and graphics
pipelines compilation.
|
|
|
|
|
|
vk_update_descriptor/vk_renderpass_cache: Add pipeline cache dependencies
|
|
The renderpass cache is used to avoid creating renderpasses on each
draw. The hashed structure is not currently optimized.
|
|
The update descriptor is used to store in flat memory a large chunk of
staging data used to update descriptor sets through templates. It
provides a push interface to easily insert descriptors following the
current pipeline. The order used in the descriptor update template has
to be implicitly followed. We can catch bugs here using validation
layers.
|
|
The stream buffer before this commit once it was full (no more bytes to
write before looping) waiting for all previous operations to finish.
This was a temporary solution and had a noticeable performance penalty
in performance (from what a profiler showed).
To avoid this mark with fences usages of the stream buffer and once it
loops wait for them to be signaled. On average this will never wait.
Each fence knows where its usage finishes, resulting in a non-paged
stream buffer.
On the other side, the buffer cache is reimplemented using the generic
buffer cache. It makes use of the staging buffer pool and the new
stream buffer.
|
|
* Allocate memory in discrete exponentially increasing chunks until the
128 MiB threshold. Allocations larger thant that increase linearly by
256 MiB (depending on the required size). This allows to use small
allocations for small resources.
* Move memory maps to a RAII abstraction. To optimize for debugging
tools (like RenderDoc) users will map/unmap on usage. If this ever
becomes a noticeable overhead (from my profiling it doesn't) we can
transparently move to persistent memory maps without harming the API,
getting optimal performance for both gameplay and debugging.
* Improve messages on exceptional situations.
* Fix typos "requeriments" -> "requirements".
* Small style changes.
|
|
This is intended for a follow up commit to avoid circular dependencies.
|
|
vk_descriptor_pool: Initial implementation
|
|
Shader_IR: add the ability to amend code in the shader ir.
|