early-access version 2547
This commit is contained in:
@@ -370,8 +370,31 @@ void Maxwell3D::CallMethodFromMME(u32 method, u32 method_argument) {
|
||||
}
|
||||
|
||||
void Maxwell3D::ProcessTopologyOverride() {
|
||||
using PrimitiveTopology = Maxwell3D::Regs::PrimitiveTopology;
|
||||
using PrimitiveTopologyOverride = Maxwell3D::Regs::PrimitiveTopologyOverride;
|
||||
|
||||
PrimitiveTopology topology{};
|
||||
|
||||
switch (regs.topology_override) {
|
||||
case PrimitiveTopologyOverride::None:
|
||||
topology = regs.draw.topology;
|
||||
break;
|
||||
case PrimitiveTopologyOverride::Points:
|
||||
topology = PrimitiveTopology::Points;
|
||||
break;
|
||||
case PrimitiveTopologyOverride::Lines:
|
||||
topology = PrimitiveTopology::Lines;
|
||||
break;
|
||||
case PrimitiveTopologyOverride::LineStrip:
|
||||
topology = PrimitiveTopology::LineStrip;
|
||||
break;
|
||||
default:
|
||||
topology = static_cast<PrimitiveTopology>(regs.topology_override);
|
||||
break;
|
||||
}
|
||||
|
||||
if (use_topology_override) {
|
||||
regs.draw.topology.Assign(regs.topology_override);
|
||||
regs.draw.topology.Assign(topology);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -367,6 +367,22 @@ public:
|
||||
Patches = 0xe,
|
||||
};
|
||||
|
||||
// Constants as from NVC0_3D_UNK1970_D3D
|
||||
// https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/drivers/nouveau/nvc0/nvc0_3d.xml.h#L1598
|
||||
enum class PrimitiveTopologyOverride : u32 {
|
||||
None = 0x0,
|
||||
Points = 0x1,
|
||||
Lines = 0x2,
|
||||
LineStrip = 0x3,
|
||||
Triangles = 0x4,
|
||||
TriangleStrip = 0x5,
|
||||
LinesAdjacency = 0xa,
|
||||
LineStripAdjacency = 0xb,
|
||||
TrianglesAdjacency = 0xc,
|
||||
TriangleStripAdjacency = 0xd,
|
||||
Patches = 0xe,
|
||||
};
|
||||
|
||||
enum class IndexFormat : u32 {
|
||||
UnsignedByte = 0x0,
|
||||
UnsignedShort = 0x1,
|
||||
@@ -1251,7 +1267,7 @@ public:
|
||||
|
||||
INSERT_PADDING_WORDS_NOINIT(0xC);
|
||||
|
||||
PrimitiveTopology topology_override;
|
||||
PrimitiveTopologyOverride topology_override;
|
||||
|
||||
INSERT_PADDING_WORDS_NOINIT(0x12);
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
@@ -292,7 +293,7 @@ std::pair<VkBuffer, VkDeviceSize> QuadIndexedPass::Assemble(
|
||||
.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT,
|
||||
.dstAccessMask = VK_ACCESS_INDEX_READ_BIT,
|
||||
};
|
||||
const std::array push_constants{base_vertex, index_shift};
|
||||
const std::array<u32, 2> push_constants{base_vertex, index_shift};
|
||||
const VkDescriptorSet set = descriptor_allocator.Commit();
|
||||
device.GetLogical().UpdateDescriptorSet(set, *descriptor_template, descriptor_data);
|
||||
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_COMPUTE, *pipeline);
|
||||
|
@@ -369,7 +369,7 @@ template <bool has_blacklists>
|
||||
void TextureCache<P>::FillImageViews(DescriptorTable<TICEntry>& table,
|
||||
std::span<ImageViewId> cached_image_view_ids,
|
||||
std::span<ImageViewInOut> views) {
|
||||
bool has_blacklisted = false;
|
||||
bool has_blacklisted;
|
||||
do {
|
||||
has_deleted_images = false;
|
||||
if constexpr (has_blacklists) {
|
||||
@@ -1763,7 +1763,7 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) {
|
||||
});
|
||||
const auto& resolution = Settings::values.resolution_info;
|
||||
for (const AliasedImage* const aliased : aliased_images) {
|
||||
if (!resolution.active || !any_rescaled) {
|
||||
if (!resolution.active | !any_rescaled) {
|
||||
CopyImage(image_id, aliased->id, aliased->copies);
|
||||
continue;
|
||||
}
|
||||
@@ -1774,7 +1774,19 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) {
|
||||
continue;
|
||||
}
|
||||
ScaleUp(aliased_image);
|
||||
CopyImage(image_id, aliased->id, aliased->copies);
|
||||
|
||||
const bool both_2d{image.info.type == ImageType::e2D &&
|
||||
aliased_image.info.type == ImageType::e2D};
|
||||
auto copies = aliased->copies;
|
||||
for (auto copy : copies) {
|
||||
copy.extent.width = std::max<u32>(
|
||||
(copy.extent.width * resolution.up_scale) >> resolution.down_shift, 1);
|
||||
if (both_2d) {
|
||||
copy.extent.height = std::max<u32>(
|
||||
(copy.extent.height * resolution.up_scale) >> resolution.down_shift, 1);
|
||||
}
|
||||
}
|
||||
CopyImage(image_id, aliased->id, copies);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user