forked from etc/pineapple-src
early-access version 1926
This commit is contained in:
parent
e98890c076
commit
1255a0abc2
7 changed files with 16 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 1920.
|
This is the source code for early-access 1926.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -350,7 +350,7 @@ std::string_view InputPrimitive(InputTopology topology) {
|
||||||
case InputTopology::Lines:
|
case InputTopology::Lines:
|
||||||
return "LINES";
|
return "LINES";
|
||||||
case InputTopology::LinesAdjacency:
|
case InputTopology::LinesAdjacency:
|
||||||
return "LINESS_ADJACENCY";
|
return "LINES_ADJACENCY";
|
||||||
case InputTopology::Triangles:
|
case InputTopology::Triangles:
|
||||||
return "TRIANGLES";
|
return "TRIANGLES";
|
||||||
case InputTopology::TrianglesAdjacency:
|
case InputTopology::TrianglesAdjacency:
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include <sirit/sirit.h>
|
#include <sirit/sirit.h>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
|
@ -327,8 +327,8 @@ public:
|
||||||
const Value& derivates, const Value& offset,
|
const Value& derivates, const Value& offset,
|
||||||
const F32& lod_clamp, TextureInstInfo info);
|
const F32& lod_clamp, TextureInstInfo info);
|
||||||
[[nodiscard]] Value ImageRead(const Value& handle, const Value& coords, TextureInstInfo info);
|
[[nodiscard]] Value ImageRead(const Value& handle, const Value& coords, TextureInstInfo info);
|
||||||
[[nodiscard]] void ImageWrite(const Value& handle, const Value& coords, const Value& color,
|
void ImageWrite(const Value& handle, const Value& coords, const Value& color,
|
||||||
TextureInstInfo info);
|
TextureInstInfo info);
|
||||||
|
|
||||||
[[nodiscard]] Value ImageAtomicIAdd(const Value& handle, const Value& coords,
|
[[nodiscard]] Value ImageAtomicIAdd(const Value& handle, const Value& coords,
|
||||||
const Value& value, TextureInstInfo info);
|
const Value& value, TextureInstInfo info);
|
||||||
|
|
|
@ -197,8 +197,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FlagsType>
|
template <typename FlagsType>
|
||||||
requires(sizeof(FlagsType) <= sizeof(u32) && std::is_trivially_copyable_v<FlagsType>)
|
requires(sizeof(FlagsType) <= sizeof(u32) &&
|
||||||
[[nodiscard]] void SetFlags(FlagsType value) noexcept {
|
std::is_trivially_copyable_v<FlagsType>) void SetFlags(FlagsType value) noexcept {
|
||||||
std::memcpy(&flags, &value, sizeof(value));
|
std::memcpy(&flags, &value, sizeof(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,7 @@ void BufferCacheRuntime::ReserveNullBuffer() {
|
||||||
if (null_buffer) {
|
if (null_buffer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
null_buffer = device.GetLogical().CreateBuffer(VkBufferCreateInfo{
|
VkBufferCreateInfo create_info{
|
||||||
.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
|
@ -367,9 +367,13 @@ void BufferCacheRuntime::ReserveNullBuffer() {
|
||||||
.sharingMode = VK_SHARING_MODE_EXCLUSIVE,
|
.sharingMode = VK_SHARING_MODE_EXCLUSIVE,
|
||||||
.queueFamilyIndexCount = 0,
|
.queueFamilyIndexCount = 0,
|
||||||
.pQueueFamilyIndices = nullptr,
|
.pQueueFamilyIndices = nullptr,
|
||||||
});
|
};
|
||||||
|
if (device.IsExtTransformFeedbackSupported()) {
|
||||||
|
create_info.usage |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT;
|
||||||
|
}
|
||||||
|
null_buffer = device.GetLogical().CreateBuffer(create_info);
|
||||||
if (device.HasDebuggingToolAttached()) {
|
if (device.HasDebuggingToolAttached()) {
|
||||||
null_buffer.SetObjectNameEXT("Null index buffer");
|
null_buffer.SetObjectNameEXT("Null buffer");
|
||||||
}
|
}
|
||||||
null_buffer_commit = memory_allocator.Commit(null_buffer, MemoryUsage::DeviceLocal);
|
null_buffer_commit = memory_allocator.Commit(null_buffer, MemoryUsage::DeviceLocal);
|
||||||
|
|
||||||
|
|
|
@ -326,7 +326,7 @@ std::pair<VkBuffer, VkDeviceSize> QuadIndexedPass::Assemble(
|
||||||
.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER,
|
.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT,
|
.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT,
|
||||||
.dstAccessMask = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT,
|
.dstAccessMask = VK_ACCESS_INDEX_READ_BIT,
|
||||||
};
|
};
|
||||||
const std::array push_constants{base_vertex, index_shift};
|
const std::array push_constants{base_vertex, index_shift};
|
||||||
const VkDescriptorSet set = descriptor_allocator.Commit();
|
const VkDescriptorSet set = descriptor_allocator.Commit();
|
||||||
|
|
Loading…
Reference in a new issue