summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.ci/scripts/merge/apply-patches-by-label-private.py41
-rw-r--r--.ci/scripts/merge/apply-patches-by-label.py6
-rw-r--r--.ci/templates/merge-private.yml47
-rw-r--r--.ci/templates/mergebot-private.yml30
-rw-r--r--.ci/yuzu-patreon-step1.yml8
-rw-r--r--.ci/yuzu-patreon-step2.yml28
-rw-r--r--.ci/yuzu-patreon.yml19
-rw-r--r--README.md1
m---------externals/fmt0
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp51
10 files changed, 183 insertions, 48 deletions
diff --git a/.ci/scripts/merge/apply-patches-by-label-private.py b/.ci/scripts/merge/apply-patches-by-label-private.py
new file mode 100644
index 000000000..6e3cb995e
--- /dev/null
+++ b/.ci/scripts/merge/apply-patches-by-label-private.py
@@ -0,0 +1,41 @@
+# Download all pull requests as patches that match a specific label
+# Usage: python download-patches-by-label.py <Label to Match> <Root Path Folder to DL to>
+
+import requests, sys, json, urllib3.request, shutil, subprocess, os, traceback
+
+org = os.getenv("PrivateMergeOrg".upper(), "yuzu-emu")
+repo = os.getenv("PrivateMergeRepo".upper(), "yuzu-private")
+tagline = sys.argv[3]
+user = sys.argv[1]
+
+http = urllib3.PoolManager()
+dl_list = {}
+
+def check_individual(repo_id, pr_id):
+ url = 'https://%sdev.azure.com/%s/%s/_apis/git/repositories/%s/pullRequests/%s/labels?api-version=5.1-preview.1' % (user, org, repo, repo_id, pr_id)
+ response = requests.get(url)
+ if (response.ok):
+ j = json.loads(response.content)
+ for tg in j['value']:
+ if (tg['name'] == sys.argv[2]):
+ return True
+ return False
+
+try:
+ url = 'https://%sdev.azure.com/%s/%s/_apis/git/pullrequests?api-version=5.1' % (user, org, repo)
+ response = requests.get(url)
+ if (response.ok):
+ j = json.loads(response.content)
+ for pr in j["value"]:
+ repo_id = pr['repository']['id']
+ pr_id = pr['pullRequestId']
+ if (check_individual(repo_id, pr_id)):
+ pn = pr_id
+ ref = pr['sourceRefName']
+ print("Matched PR# %s" % pn)
+ print(subprocess.check_output(["git", "fetch", "https://%sdev.azure.com/%s/_git/%s" % (user, org, repo), ref, "-f"]))
+ print(subprocess.check_output(["git", "merge", "--squash", 'origin/' + ref.replace('refs/heads/','')]))
+ print(subprocess.check_output(["git", "commit", "-m\"Merge %s PR %s\"" % (tagline, pn)]))
+except:
+ traceback.print_exc(file=sys.stdout)
+ sys.exit(-1)
diff --git a/.ci/scripts/merge/apply-patches-by-label.py b/.ci/scripts/merge/apply-patches-by-label.py
index b346001a5..e81db9287 100644
--- a/.ci/scripts/merge/apply-patches-by-label.py
+++ b/.ci/scripts/merge/apply-patches-by-label.py
@@ -1,7 +1,9 @@
# Download all pull requests as patches that match a specific label
# Usage: python download-patches-by-label.py <Label to Match> <Root Path Folder to DL to>
-import requests, sys, json, urllib3.request, shutil, subprocess
+import requests, sys, json, urllib3.request, shutil, subprocess, os
+
+tagline = sys.argv[2]
http = urllib3.PoolManager()
dl_list = {}
@@ -23,6 +25,6 @@ try:
print("Matched PR# %s" % pn)
print(subprocess.check_output(["git", "fetch", "https://github.com/yuzu-emu/yuzu.git", "pull/%s/head:pr-%s" % (pn, pn), "-f"]))
print(subprocess.check_output(["git", "merge", "--squash", "pr-%s" % pn]))
- print(subprocess.check_output(["git", "commit", "-m\"Merge PR %s\"" % pn]))
+ print(subprocess.check_output(["git", "commit", "-m\"Merge %s PR %s\"" % (tagline, pn)]))
except:
sys.exit(-1)
diff --git a/.ci/templates/merge-private.yml b/.ci/templates/merge-private.yml
new file mode 100644
index 000000000..a640cfbde
--- /dev/null
+++ b/.ci/templates/merge-private.yml
@@ -0,0 +1,47 @@
+jobs:
+- job: merge
+ displayName: 'pull requests'
+ steps:
+ - checkout: self
+ submodules: recursive
+ - template: ./mergebot-private.yml
+ parameters:
+ matchLabel: '$(BuildName)-merge'
+ matchLabelPublic: '$(PublicBuildName)-merge'
+ - task: ArchiveFiles@2
+ displayName: 'Package Source'
+ inputs:
+ rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
+ includeRootFolder: false
+ archiveType: '7z'
+ archiveFile: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
+ - task: PublishPipelineArtifact@1
+ displayName: 'Upload Artifacts'
+ inputs:
+ targetPath: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
+ artifact: 'yuzu-$(BuildName)-source'
+ replaceExistingArchive: true
+- job: upload_source
+ displayName: 'upload'
+ dependsOn: merge
+ steps:
+ - template: ./sync-source.yml
+ parameters:
+ artifactSource: 'true'
+ needSubmodules: 'true'
+ - script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
+ displayName: 'Apply Git Configuration'
+ - script: git tag -a $(BuildName)-$(Build.BuildId) -m "yuzu $(BuildName) $(Build.BuildNumber) $(Build.DefinitionName)"
+ displayName: 'Tag Source'
+ - script: git remote add other $(GitRepoPushChangesURL)
+ displayName: 'Register Repository'
+ - script: git push --follow-tags --force other HEAD:$(GitPushBranch)
+ displayName: 'Update Code'
+ - script: git rev-list -n 1 $(BuildName)-$(Build.BuildId) > $(Build.ArtifactStagingDirectory)/tag-commit.sha
+ displayName: 'Calculate Release Point'
+ - task: PublishPipelineArtifact@1
+ displayName: 'Upload Release Point'
+ inputs:
+ targetPath: '$(Build.ArtifactStagingDirectory)/tag-commit.sha'
+ artifact: 'yuzu-$(BuildName)-release-point'
+ replaceExistingArchive: true \ No newline at end of file
diff --git a/.ci/templates/mergebot-private.yml b/.ci/templates/mergebot-private.yml
new file mode 100644
index 000000000..f9a40cf61
--- /dev/null
+++ b/.ci/templates/mergebot-private.yml
@@ -0,0 +1,30 @@
+parameters:
+ matchLabel: 'dummy-merge'
+ matchLabelPublic: 'dummy-merge'
+
+steps:
+ - script: mkdir $(System.DefaultWorkingDirectory)/patches && pip install requests urllib3
+ displayName: 'Prepare Environment'
+ - script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
+ displayName: 'Apply Git Configuration'
+ - task: PythonScript@0
+ displayName: 'Discover, Download, and Apply Patches (Mainline)'
+ inputs:
+ scriptSource: 'filePath'
+ scriptPath: '.ci/scripts/merge/apply-patches-by-label.py'
+ arguments: '${{ parameters.matchLabelPublic }} $(MergeTaglinePublic) patches-public'
+ workingDirectory: '$(System.DefaultWorkingDirectory)'
+ - task: PythonScript@0
+ displayName: 'Discover, Download, and Apply Patches (Patreon Public)'
+ inputs:
+ scriptSource: 'filePath'
+ scriptPath: '.ci/scripts/merge/apply-patches-by-label.py'
+ arguments: '${{ parameters.matchLabel }} "$(MergeTaglinePrivate) Public" patches-mixed-public'
+ workingDirectory: '$(System.DefaultWorkingDirectory)'
+ - task: PythonScript@0
+ displayName: 'Discover, Download, and Apply Patches (Patreon Private)'
+ inputs:
+ scriptSource: 'filePath'
+ scriptPath: '.ci/scripts/merge/apply-patches-by-label-private.py'
+ arguments: '$(PrivateMergeUser) ${{ parameters.matchLabel }} "$(MergeTaglinePrivate) Private" patches-private'
+ workingDirectory: '$(System.DefaultWorkingDirectory)'
diff --git a/.ci/yuzu-patreon-step1.yml b/.ci/yuzu-patreon-step1.yml
new file mode 100644
index 000000000..cf30397cd
--- /dev/null
+++ b/.ci/yuzu-patreon-step1.yml
@@ -0,0 +1,8 @@
+trigger:
+- master
+
+stages:
+- stage: merge
+ displayName: 'merge'
+ jobs:
+ - template: ./templates/merge-private.yml
diff --git a/.ci/yuzu-patreon-step2.yml b/.ci/yuzu-patreon-step2.yml
new file mode 100644
index 000000000..080118224
--- /dev/null
+++ b/.ci/yuzu-patreon-step2.yml
@@ -0,0 +1,28 @@
+trigger:
+- master
+
+stages:
+- stage: format
+ displayName: 'format'
+ jobs:
+ - job: format
+ displayName: 'clang'
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - template: ./templates/format-check.yml
+- stage: build
+ dependsOn: format
+ displayName: 'build'
+ jobs:
+ - template: ./templates/build-standard.yml
+ parameters:
+ cache: 'true'
+- stage: release
+ displayName: 'release'
+ dependsOn: build
+ jobs:
+ - job: azure
+ displayName: 'azure'
+ steps:
+ - template: ./templates/release-universal.yml \ No newline at end of file
diff --git a/.ci/yuzu-patreon.yml b/.ci/yuzu-patreon.yml
deleted file mode 100644
index aa912913d..000000000
--- a/.ci/yuzu-patreon.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-# Starter pipeline
-# Start with a minimal pipeline that you can customize to build and deploy your code.
-# Add steps that build, run tests, deploy, and more:
-# https://aka.ms/yaml
-
-trigger:
-- master
-
-pool:
- vmImage: 'ubuntu-latest'
-
-steps:
-- script: echo Hello, world!
- displayName: 'Run a one-line script'
-
-- script: |
- echo Add other tasks to build, test, and deploy your project.
- echo See https://aka.ms/yaml
- displayName: 'Run a multi-line script'
diff --git a/README.md b/README.md
index ecace43f2..bdee2e872 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,6 @@
yuzu emulator
=============
[![Travis CI Build Status](https://travis-ci.org/yuzu-emu/yuzu.svg?branch=master)](https://travis-ci.org/yuzu-emu/yuzu)
-[![AppVeyor CI Build Status](https://ci.appveyor.com/api/projects/status/77k97svb2usreu68?svg=true)](https://ci.appveyor.com/project/bunnei/yuzu)
[![Azure Mainline CI Build Status](https://dev.azure.com/yuzu-emu/yuzu/_apis/build/status/yuzu%20mainline?branchName=master)](https://dev.azure.com/yuzu-emu/yuzu/)
yuzu is an experimental open-source emulator for the Nintendo Switch from the creators of [Citra](https://citra-emu.org/).
diff --git a/externals/fmt b/externals/fmt
-Subproject 7512a55aa3ae309587ca89668ef9ec4074a51a1
+Subproject 4b8f8fac96a7819f28f4be523ca10a2d5d8aaaf
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index e6b36a0f2..8fa9e6534 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -242,6 +242,26 @@ constexpr const char* GetTypeString(Type type) {
}
}
+constexpr const char* GetImageTypeDeclaration(Tegra::Shader::ImageType image_type) {
+ switch (image_type) {
+ case Tegra::Shader::ImageType::Texture1D:
+ return "1D";
+ case Tegra::Shader::ImageType::TextureBuffer:
+ return "Buffer";
+ case Tegra::Shader::ImageType::Texture1DArray:
+ return "1DArray";
+ case Tegra::Shader::ImageType::Texture2D:
+ return "2D";
+ case Tegra::Shader::ImageType::Texture2DArray:
+ return "2DArray";
+ case Tegra::Shader::ImageType::Texture3D:
+ return "3D";
+ default:
+ UNREACHABLE();
+ return "1D";
+ }
+}
+
/// Generates code to use for a swizzle operation.
constexpr const char* GetSwizzle(u32 element) {
constexpr std::array swizzle = {".x", ".y", ".z", ".w"};
@@ -721,26 +741,6 @@ private:
void DeclareImages() {
const auto& images{ir.GetImages()};
for (const auto& [offset, image] : images) {
- const char* image_type = [&] {
- switch (image.GetType()) {
- case Tegra::Shader::ImageType::Texture1D:
- return "1D";
- case Tegra::Shader::ImageType::TextureBuffer:
- return "Buffer";
- case Tegra::Shader::ImageType::Texture1DArray:
- return "1DArray";
- case Tegra::Shader::ImageType::Texture2D:
- return "2D";
- case Tegra::Shader::ImageType::Texture2DArray:
- return "2DArray";
- case Tegra::Shader::ImageType::Texture3D:
- return "3D";
- default:
- UNREACHABLE();
- return "1D";
- }
- }();
-
std::string qualifier = "coherent volatile";
if (image.IsRead() && !image.IsWritten()) {
qualifier += " readonly";
@@ -748,13 +748,10 @@ private:
qualifier += " writeonly";
}
- std::string format;
- if (image.IsAtomic()) {
- format = "r32ui, ";
- }
-
+ const char* format = image.IsAtomic() ? "r32ui, " : "";
+ const char* type_declaration = GetImageTypeDeclaration(image.GetType());
code.AddLine("layout ({}binding = IMAGE_BINDING_{}) {} uniform uimage{} {};", format,
- image.GetIndex(), qualifier, image_type, GetImage(image));
+ image.GetIndex(), qualifier, type_declaration, GetImage(image));
}
if (!images.empty()) {
code.AddNewLine();
@@ -1494,6 +1491,8 @@ private:
case Tegra::Shader::HalfType::H1_H1:
return {fmt::format("vec2({}[1])", operand.AsHalfFloat()), Type::HalfFloat};
}
+ UNREACHABLE();
+ return {"0", Type::Int};
}
Expression HMergeF32(Operation operation) {