mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
vulkan hotfix (#3046)
* Rework vertex attribute binding for vulkan. Allows always providing a buffer view to the pipeline even if the game has the attribute disabled as long as it is consumed by the vertex shader.
This commit is contained in:
parent
9747ab61f9
commit
df8fa74e2a
9 changed files with 77 additions and 44 deletions
|
|
@ -748,7 +748,7 @@ namespace rsx
|
|||
}
|
||||
|
||||
std::vector<std::variant<vertex_array_buffer, vertex_array_register, empty_vertex_array>>
|
||||
thread::get_vertex_buffers(const rsx::rsx_state& state, const std::vector<std::pair<u32, u32>>& vertex_ranges) const
|
||||
thread::get_vertex_buffers(const rsx::rsx_state& state, const std::vector<std::pair<u32, u32>>& vertex_ranges, const u64 consumed_attrib_mask) const
|
||||
{
|
||||
std::vector<std::variant<vertex_array_buffer, vertex_array_register, empty_vertex_array>> result;
|
||||
result.reserve(rsx::limits::vertex_count);
|
||||
|
|
@ -756,8 +756,10 @@ namespace rsx
|
|||
u32 input_mask = state.vertex_attrib_input_mask();
|
||||
for (u8 index = 0; index < rsx::limits::vertex_count; ++index)
|
||||
{
|
||||
bool enabled = !!(input_mask & (1 << index));
|
||||
if (!enabled)
|
||||
const bool enabled = !!(input_mask & (1 << index));
|
||||
const bool consumed = !!(consumed_attrib_mask & (1ull << index));
|
||||
|
||||
if (!enabled && !consumed)
|
||||
continue;
|
||||
|
||||
if (state.vertex_arrays_info[index].size() > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue