early-access version 3211
This commit is contained in:
parent
6950ccef16
commit
2e78a58bea
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3210.
|
This is the source code for early-access 3211.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -285,6 +285,9 @@ void BufferCacheRuntime::BindQuadArrayIndexBuffer(u32 first, u32 count) {
|
|||||||
|
|
||||||
void BufferCacheRuntime::BindVertexBuffer(u32 index, VkBuffer buffer, u32 offset, u32 size,
|
void BufferCacheRuntime::BindVertexBuffer(u32 index, VkBuffer buffer, u32 offset, u32 size,
|
||||||
u32 stride) {
|
u32 stride) {
|
||||||
|
if (index >= device.GetMaxVertexInputBindings()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (device.IsExtExtendedDynamicStateSupported()) {
|
if (device.IsExtExtendedDynamicStateSupported()) {
|
||||||
scheduler.Record([index, buffer, offset, size, stride](vk::CommandBuffer cmdbuf) {
|
scheduler.Record([index, buffer, offset, size, stride](vk::CommandBuffer cmdbuf) {
|
||||||
const VkDeviceSize vk_offset = buffer != VK_NULL_HANDLE ? offset : 0;
|
const VkDeviceSize vk_offset = buffer != VK_NULL_HANDLE ? offset : 0;
|
||||||
|
@ -529,7 +529,9 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
|
|||||||
static_vector<VkVertexInputBindingDivisorDescriptionEXT, 32> vertex_binding_divisors;
|
static_vector<VkVertexInputBindingDivisorDescriptionEXT, 32> vertex_binding_divisors;
|
||||||
static_vector<VkVertexInputAttributeDescription, 32> vertex_attributes;
|
static_vector<VkVertexInputAttributeDescription, 32> vertex_attributes;
|
||||||
if (key.state.dynamic_vertex_input) {
|
if (key.state.dynamic_vertex_input) {
|
||||||
for (size_t index = 0; index < key.state.attributes.size(); ++index) {
|
const size_t num_vertex_arrays = std::min(
|
||||||
|
key.state.attributes.size(), static_cast<size_t>(device.GetMaxVertexInputBindings()));
|
||||||
|
for (size_t index = 0; index < num_vertex_arrays; ++index) {
|
||||||
const u32 type = key.state.DynamicAttributeType(index);
|
const u32 type = key.state.DynamicAttributeType(index);
|
||||||
if (!stage_infos[0].loads.Generic(index) || type == 0) {
|
if (!stage_infos[0].loads.Generic(index) || type == 0) {
|
||||||
continue;
|
continue;
|
||||||
@ -551,7 +553,9 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (size_t index = 0; index < Maxwell::NumVertexArrays; ++index) {
|
const size_t num_vertex_arrays = std::min(
|
||||||
|
Maxwell::NumVertexArrays, static_cast<size_t>(device.GetMaxVertexInputBindings()));
|
||||||
|
for (size_t index = 0; index < num_vertex_arrays; ++index) {
|
||||||
const bool instanced = key.state.binding_divisors[index] != 0;
|
const bool instanced = key.state.binding_divisors[index] != 0;
|
||||||
const auto rate =
|
const auto rate =
|
||||||
instanced ? VK_VERTEX_INPUT_RATE_INSTANCE : VK_VERTEX_INPUT_RATE_VERTEX;
|
instanced ? VK_VERTEX_INPUT_RATE_INSTANCE : VK_VERTEX_INPUT_RATE_VERTEX;
|
||||||
@ -580,6 +584,8 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ASSERT(vertex_attributes.size() <= device.GetMaxVertexInputAttributes());
|
||||||
|
|
||||||
VkPipelineVertexInputStateCreateInfo vertex_input_ci{
|
VkPipelineVertexInputStateCreateInfo vertex_input_ci{
|
||||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
|
@ -341,6 +341,15 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, const Device& device
|
|||||||
.support_snorm_render_buffer = true,
|
.support_snorm_render_buffer = true,
|
||||||
.support_viewport_index_layer = device.IsExtShaderViewportIndexLayerSupported(),
|
.support_viewport_index_layer = device.IsExtShaderViewportIndexLayerSupported(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (device.GetMaxVertexInputAttributes() < Maxwell::NumVertexAttributes) {
|
||||||
|
LOG_WARNING(Render_Vulkan, "maxVertexInputAttributes is too low: {} < {}",
|
||||||
|
device.GetMaxVertexInputAttributes(), Maxwell::NumVertexAttributes);
|
||||||
|
}
|
||||||
|
if (device.GetMaxVertexInputBindings() < Maxwell::NumVertexArrays) {
|
||||||
|
LOG_WARNING(Render_Vulkan, "maxVertexInputBindings is too low: {} < {}",
|
||||||
|
device.GetMaxVertexInputBindings(), Maxwell::NumVertexArrays);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PipelineCache::~PipelineCache() = default;
|
PipelineCache::~PipelineCache() = default;
|
||||||
|
@ -1380,6 +1380,10 @@ void Device::SetupFeatures() {
|
|||||||
is_shader_storage_image_multisample = features.shaderStorageImageMultisample;
|
is_shader_storage_image_multisample = features.shaderStorageImageMultisample;
|
||||||
is_blit_depth_stencil_supported = TestDepthStencilBlits();
|
is_blit_depth_stencil_supported = TestDepthStencilBlits();
|
||||||
is_optimal_astc_supported = IsOptimalAstcSupported(features);
|
is_optimal_astc_supported = IsOptimalAstcSupported(features);
|
||||||
|
|
||||||
|
const VkPhysicalDeviceLimits& limits{properties.limits};
|
||||||
|
max_vertex_input_attributes = limits.maxVertexInputAttributes;
|
||||||
|
max_vertex_input_bindings = limits.maxVertexInputBindings;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Device::SetupProperties() {
|
void Device::SetupProperties() {
|
||||||
|
@ -368,6 +368,14 @@ public:
|
|||||||
return must_emulate_bgr565;
|
return must_emulate_bgr565;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 GetMaxVertexInputAttributes() const {
|
||||||
|
return max_vertex_input_attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 GetMaxVertexInputBindings() const {
|
||||||
|
return max_vertex_input_bindings;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Checks if the physical device is suitable.
|
/// Checks if the physical device is suitable.
|
||||||
void CheckSuitability(bool requires_swapchain) const;
|
void CheckSuitability(bool requires_swapchain) const;
|
||||||
@ -467,6 +475,8 @@ private:
|
|||||||
bool supports_d24_depth{}; ///< Supports D24 depth buffers.
|
bool supports_d24_depth{}; ///< Supports D24 depth buffers.
|
||||||
bool cant_blit_msaa{}; ///< Does not support MSAA<->MSAA blitting.
|
bool cant_blit_msaa{}; ///< Does not support MSAA<->MSAA blitting.
|
||||||
bool must_emulate_bgr565{}; ///< Emulates BGR565 by swizzling RGB565 format.
|
bool must_emulate_bgr565{}; ///< Emulates BGR565 by swizzling RGB565 format.
|
||||||
|
u32 max_vertex_input_attributes{}; ///< Max vertex input attributes in pipeline
|
||||||
|
u32 max_vertex_input_bindings{}; ///< Max vertex input buffers in pipeline
|
||||||
|
|
||||||
// Telemetry parameters
|
// Telemetry parameters
|
||||||
std::string vendor_name; ///< Device's driver name.
|
std::string vendor_name; ///< Device's driver name.
|
||||||
|
@ -697,7 +697,6 @@ void Config::ReadRendererValues() {
|
|||||||
ReadGlobalSetting(Settings::values.fsr_sharpening_slider);
|
ReadGlobalSetting(Settings::values.fsr_sharpening_slider);
|
||||||
ReadGlobalSetting(Settings::values.anti_aliasing);
|
ReadGlobalSetting(Settings::values.anti_aliasing);
|
||||||
ReadGlobalSetting(Settings::values.max_anisotropy);
|
ReadGlobalSetting(Settings::values.max_anisotropy);
|
||||||
ReadGlobalSetting(Settings::values.use_speed_limit);
|
|
||||||
ReadGlobalSetting(Settings::values.speed_limit);
|
ReadGlobalSetting(Settings::values.speed_limit);
|
||||||
ReadGlobalSetting(Settings::values.use_disk_shader_cache);
|
ReadGlobalSetting(Settings::values.use_disk_shader_cache);
|
||||||
ReadGlobalSetting(Settings::values.gpu_accuracy);
|
ReadGlobalSetting(Settings::values.gpu_accuracy);
|
||||||
@ -1328,7 +1327,6 @@ void Config::SaveRendererValues() {
|
|||||||
static_cast<u32>(Settings::values.anti_aliasing.GetDefault()),
|
static_cast<u32>(Settings::values.anti_aliasing.GetDefault()),
|
||||||
Settings::values.anti_aliasing.UsingGlobal());
|
Settings::values.anti_aliasing.UsingGlobal());
|
||||||
WriteGlobalSetting(Settings::values.max_anisotropy);
|
WriteGlobalSetting(Settings::values.max_anisotropy);
|
||||||
WriteGlobalSetting(Settings::values.use_speed_limit);
|
|
||||||
WriteGlobalSetting(Settings::values.speed_limit);
|
WriteGlobalSetting(Settings::values.speed_limit);
|
||||||
WriteGlobalSetting(Settings::values.use_disk_shader_cache);
|
WriteGlobalSetting(Settings::values.use_disk_shader_cache);
|
||||||
WriteSetting(QString::fromStdString(Settings::values.gpu_accuracy.GetLabel()),
|
WriteSetting(QString::fromStdString(Settings::values.gpu_accuracy.GetLabel()),
|
||||||
|
@ -1789,6 +1789,9 @@ void GMainWindow::ShutdownGame() {
|
|||||||
|
|
||||||
AllowOSSleep();
|
AllowOSSleep();
|
||||||
|
|
||||||
|
// Disable unlimited frame rate
|
||||||
|
Settings::values.use_speed_limit.SetValue(true);
|
||||||
|
|
||||||
system->SetShuttingDown(true);
|
system->SetShuttingDown(true);
|
||||||
system->DetachDebugger();
|
system->DetachDebugger();
|
||||||
discord_rpc->Pause();
|
discord_rpc->Pause();
|
||||||
|
Loading…
Reference in New Issue
Block a user