early-access version 1697

main
pineappleEA 2021-05-20 01:36:46 +02:00
parent c5d7f4e5a7
commit 26aa465a3d
4 changed files with 15 additions and 53 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 1696. This is the source code for early-access 1697.
## Legal Notice ## Legal Notice

View File

@ -823,6 +823,13 @@ void Image::CopyBufferToImage(const VideoCommon::BufferImageCopy& copy, size_t b
const bool is_compressed = gl_format == GL_NONE; const bool is_compressed = gl_format == GL_NONE;
const void* const offset = reinterpret_cast<const void*>(copy.buffer_offset + buffer_offset); const void* const offset = reinterpret_cast<const void*>(copy.buffer_offset + buffer_offset);
if (is_compressed && !IsPixelFormatASTC(info.format) &&
(copy.image_extent.width < 4 || copy.image_extent.height < 4)) {
// Per the documentation for the BPTC, S3TC, and RGTC formats, INVALID_OPERATION will be
// generated if either of the dimensions are not a multiple of four. This mainly occurs on
// small levels of mip-mapped textures, which this condition will catch.
return;
}
switch (info.type) { switch (info.type) {
case ImageType::e1D: case ImageType::e1D:
if (is_compressed) { if (is_compressed) {

View File

@ -39,21 +39,6 @@ void ConfigurationShared::ApplyPerGameSetting(Settings::Setting<int>* setting,
} }
} }
void ConfigurationShared::ApplyPerGameSetting(Settings::Setting<Settings::RendererBackend>* setting,
const QComboBox* combobox) {
if (Settings::IsConfiguringGlobal() && setting->UsingGlobal()) {
setting->SetValue(static_cast<Settings::RendererBackend>(combobox->currentIndex()));
} else if (!Settings::IsConfiguringGlobal()) {
if (combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
setting->SetGlobal(true);
} else {
setting->SetGlobal(false);
setting->SetValue(static_cast<Settings::RendererBackend>(
combobox->currentIndex() - ConfigurationShared::USE_GLOBAL_OFFSET));
}
}
}
void ConfigurationShared::SetPerGameSetting(QCheckBox* checkbox, void ConfigurationShared::SetPerGameSetting(QCheckBox* checkbox,
const Settings::Setting<bool>* setting) { const Settings::Setting<bool>* setting) {
if (setting->UsingGlobal()) { if (setting->UsingGlobal()) {
@ -63,34 +48,6 @@ void ConfigurationShared::SetPerGameSetting(QCheckBox* checkbox,
} }
} }
void ConfigurationShared::SetPerGameSetting(QComboBox* combobox,
const Settings::Setting<int>* setting) {
combobox->setCurrentIndex(setting->UsingGlobal()
? ConfigurationShared::USE_GLOBAL_INDEX
: setting->GetValue() + ConfigurationShared::USE_GLOBAL_OFFSET);
}
void ConfigurationShared::SetPerGameSetting(
QComboBox* combobox, const Settings::Setting<Settings::RendererBackend>* setting) {
combobox->setCurrentIndex(setting->UsingGlobal() ? ConfigurationShared::USE_GLOBAL_INDEX
: static_cast<int>(setting->GetValue()) +
ConfigurationShared::USE_GLOBAL_OFFSET);
}
void ConfigurationShared::SetPerGameSetting(
QComboBox* combobox, const Settings::Setting<Settings::GPUAccuracy>* setting) {
combobox->setCurrentIndex(setting->UsingGlobal() ? ConfigurationShared::USE_GLOBAL_INDEX
: static_cast<int>(setting->GetValue()) +
ConfigurationShared::USE_GLOBAL_OFFSET);
}
void ConfigurationShared::SetPerGameSetting(
QComboBox* combobox, const Settings::Setting<Settings::CPUAccuracy>* setting) {
combobox->setCurrentIndex(setting->UsingGlobal() ? ConfigurationShared::USE_GLOBAL_INDEX
: static_cast<int>(setting->GetValue()) +
ConfigurationShared::USE_GLOBAL_OFFSET);
}
void ConfigurationShared::SetHighlight(QWidget* widget, bool highlighted) { void ConfigurationShared::SetHighlight(QWidget* widget, bool highlighted) {
if (highlighted) { if (highlighted) {
widget->setStyleSheet(QStringLiteral("QWidget#%1 { background-color:rgba(0,203,255,0.5) }") widget->setStyleSheet(QStringLiteral("QWidget#%1 { background-color:rgba(0,203,255,0.5) }")

View File

@ -29,18 +29,16 @@ enum class CheckState {
void ApplyPerGameSetting(Settings::Setting<bool>* setting, const QCheckBox* checkbox, void ApplyPerGameSetting(Settings::Setting<bool>* setting, const QCheckBox* checkbox,
const CheckState& tracker); const CheckState& tracker);
void ApplyPerGameSetting(Settings::Setting<int>* setting, const QComboBox* combobox); void ApplyPerGameSetting(Settings::Setting<int>* setting, const QComboBox* combobox);
void ApplyPerGameSetting(Settings::Setting<Settings::RendererBackend>* setting,
const QComboBox* combobox);
// Sets a Qt UI element given a Settings::Setting // Sets a Qt UI element given a Settings::Setting
void SetPerGameSetting(QCheckBox* checkbox, const Settings::Setting<bool>* setting); void SetPerGameSetting(QCheckBox* checkbox, const Settings::Setting<bool>* setting);
void SetPerGameSetting(QComboBox* combobox, const Settings::Setting<int>* setting);
void SetPerGameSetting(QComboBox* combobox, template <typename Type>
const Settings::Setting<Settings::RendererBackend>* setting); void SetPerGameSetting(QComboBox* combobox, const Settings::Setting<Type>* setting) {
void SetPerGameSetting(QComboBox* combobox, combobox->setCurrentIndex(setting->UsingGlobal() ? ConfigurationShared::USE_GLOBAL_INDEX
const Settings::Setting<Settings::GPUAccuracy>* setting); : static_cast<int>(setting->GetValue()) +
void SetPerGameSetting(QComboBox* combobox, ConfigurationShared::USE_GLOBAL_OFFSET);
const Settings::Setting<Settings::CPUAccuracy>* setting); }
// (Un)highlights a Qt UI element // (Un)highlights a Qt UI element
void SetHighlight(QWidget* widget, bool highlighted); void SetHighlight(QWidget* widget, bool highlighted);