yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

video_core: fix build

This commit is contained in:
Liam 2022-12-24 22:24:56 -05:00 committed by Fernando Sahmkow
parent d09aa0182f
commit 4814d87385
4 changed files with 38 additions and 3 deletions

View File

@ -410,7 +410,8 @@ HLEMacro::HLEMacro(Engines::Maxwell3D& maxwell3d_) : maxwell3d{maxwell3d_} {
builders.emplace(0x3F5E74B9C9A50164ULL, builders.emplace(0x3F5E74B9C9A50164ULL,
std::function<std::unique_ptr<CachedMacro>(Engines::Maxwell3D&)>( std::function<std::unique_ptr<CachedMacro>(Engines::Maxwell3D&)>(
[](Engines::Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> { [](Engines::Maxwell3D& maxwell3d__) -> std::unique_ptr<CachedMacro> {
return std::make_unique<HLE_MultiDrawIndexedIndirectCount>(maxwell3d__); return std::make_unique<HLE_MultiDrawIndexedIndirectCount>(
maxwell3d__);
})); }));
builders.emplace(0xEAD26C3E2109B06BULL, builders.emplace(0xEAD26C3E2109B06BULL,
std::function<std::unique_ptr<CachedMacro>(Engines::Maxwell3D&)>( std::function<std::unique_ptr<CachedMacro>(Engines::Maxwell3D&)>(

View File

@ -229,9 +229,13 @@ void RasterizerVulkan::DrawIndirect() {
const auto& params = maxwell3d->draw_manager->GetIndirectParams(); const auto& params = maxwell3d->draw_manager->GetIndirectParams();
buffer_cache.SetDrawIndirect(&params); buffer_cache.SetDrawIndirect(&params);
PrepareDraw(params.is_indexed, [this, &params] { PrepareDraw(params.is_indexed, [this, &params] {
const auto [buffer, offset] = buffer_cache.GetDrawIndirectBuffer(); const auto indirect_buffer = buffer_cache.GetDrawIndirectBuffer();
const auto& buffer = indirect_buffer.first;
const auto& offset = indirect_buffer.second;
if (params.include_count) { if (params.include_count) {
const auto [draw_buffer, offset_base] = buffer_cache.GetDrawIndirectCount(); const auto count = buffer_cache.GetDrawIndirectCount();
const auto& draw_buffer = count.first;
const auto& offset_base = count.second;
scheduler.Record([draw_buffer_obj = draw_buffer->Handle(), scheduler.Record([draw_buffer_obj = draw_buffer->Handle(),
buffer_obj = buffer->Handle(), offset_base, offset, buffer_obj = buffer->Handle(), offset_base, offset,
params](vk::CommandBuffer cmdbuf) { params](vk::CommandBuffer cmdbuf) {

View File

@ -199,6 +199,9 @@ StagingBufferRef StagingBufferPool::GetStreamBuffer(size_t size) {
.buffer = *stream_buffer, .buffer = *stream_buffer,
.offset = static_cast<VkDeviceSize>(offset), .offset = static_cast<VkDeviceSize>(offset),
.mapped_span = std::span<u8>(stream_pointer + offset, size), .mapped_span = std::span<u8>(stream_pointer + offset, size),
.usage{},
.log2_level{},
.index{},
}; };
} }

View File

@ -576,6 +576,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
.pNext = nullptr, .pNext = nullptr,
.extendedDynamicState2 = VK_TRUE, .extendedDynamicState2 = VK_TRUE,
.extendedDynamicState2LogicOp = ext_extended_dynamic_state_2_extra ? VK_TRUE : VK_FALSE, .extendedDynamicState2LogicOp = ext_extended_dynamic_state_2_extra ? VK_TRUE : VK_FALSE,
.extendedDynamicState2PatchControlPoints = VK_FALSE,
}; };
SetNext(next, dynamic_state_2); SetNext(next, dynamic_state_2);
} else { } else {
@ -587,8 +588,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
dynamic_state_3 = { dynamic_state_3 = {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT, .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT,
.pNext = nullptr, .pNext = nullptr,
.extendedDynamicState3TessellationDomainOrigin = VK_FALSE,
.extendedDynamicState3DepthClampEnable = .extendedDynamicState3DepthClampEnable =
ext_extended_dynamic_state_3_enables ? VK_TRUE : VK_FALSE, ext_extended_dynamic_state_3_enables ? VK_TRUE : VK_FALSE,
.extendedDynamicState3PolygonMode = VK_FALSE,
.extendedDynamicState3RasterizationSamples = VK_FALSE,
.extendedDynamicState3SampleMask = VK_FALSE,
.extendedDynamicState3AlphaToCoverageEnable = VK_FALSE,
.extendedDynamicState3AlphaToOneEnable = VK_FALSE,
.extendedDynamicState3LogicOpEnable = .extendedDynamicState3LogicOpEnable =
ext_extended_dynamic_state_3_enables ? VK_TRUE : VK_FALSE, ext_extended_dynamic_state_3_enables ? VK_TRUE : VK_FALSE,
.extendedDynamicState3ColorBlendEnable = .extendedDynamicState3ColorBlendEnable =
@ -597,6 +604,26 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
ext_extended_dynamic_state_3_blend ? VK_TRUE : VK_FALSE, ext_extended_dynamic_state_3_blend ? VK_TRUE : VK_FALSE,
.extendedDynamicState3ColorWriteMask = .extendedDynamicState3ColorWriteMask =
ext_extended_dynamic_state_3_blend ? VK_TRUE : VK_FALSE, ext_extended_dynamic_state_3_blend ? VK_TRUE : VK_FALSE,
.extendedDynamicState3RasterizationStream = VK_FALSE,
.extendedDynamicState3ConservativeRasterizationMode = VK_FALSE,
.extendedDynamicState3ExtraPrimitiveOverestimationSize = VK_FALSE,
.extendedDynamicState3DepthClipEnable = VK_FALSE,
.extendedDynamicState3SampleLocationsEnable = VK_FALSE,
.extendedDynamicState3ColorBlendAdvanced = VK_FALSE,
.extendedDynamicState3ProvokingVertexMode = VK_FALSE,
.extendedDynamicState3LineRasterizationMode = VK_FALSE,
.extendedDynamicState3LineStippleEnable = VK_FALSE,
.extendedDynamicState3DepthClipNegativeOneToOne = VK_FALSE,
.extendedDynamicState3ViewportWScalingEnable = VK_FALSE,
.extendedDynamicState3ViewportSwizzle = VK_FALSE,
.extendedDynamicState3CoverageToColorEnable = VK_FALSE,
.extendedDynamicState3CoverageToColorLocation = VK_FALSE,
.extendedDynamicState3CoverageModulationMode = VK_FALSE,
.extendedDynamicState3CoverageModulationTableEnable = VK_FALSE,
.extendedDynamicState3CoverageModulationTable = VK_FALSE,
.extendedDynamicState3CoverageReductionMode = VK_FALSE,
.extendedDynamicState3RepresentativeFragmentTestEnable = VK_FALSE,
.extendedDynamicState3ShadingRateImageEnable = VK_FALSE,
}; };
SetNext(next, dynamic_state_3); SetNext(next, dynamic_state_3);
} else { } else {