diff options
| author | 2021-02-12 22:22:18 -0800 | |
|---|---|---|
| committer | 2021-02-12 22:22:18 -0800 | |
| commit | d3c7a7e7cf4bcabb171c98fe55e6e0291f8ee980 (patch) | |
| tree | 5c900d10847e1768a4951c1e6bec35f2618b5991 /src/video_core/shader | |
| parent | Merge pull request #5877 from ameerj/res-limit-usage (diff) | |
| parent | config: Make high GPU accuracy the default (diff) | |
| download | yuzu-d3c7a7e7cf4bcabb171c98fe55e6e0291f8ee980.tar.gz yuzu-d3c7a7e7cf4bcabb171c98fe55e6e0291f8ee980.tar.xz yuzu-d3c7a7e7cf4bcabb171c98fe55e6e0291f8ee980.zip | |
Merge pull request #5741 from ReinUsesLisp/new-bufcache
video_core: Reimplement the buffer cache
Diffstat (limited to 'src/video_core/shader')
| -rw-r--r-- | src/video_core/shader/async_shaders.h | 9 | ||||
| -rw-r--r-- | src/video_core/shader/decode/other.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/shader/shader_ir.h | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/video_core/shader/async_shaders.h b/src/video_core/shader/async_shaders.h index 0dbb1a31f..7fdff6e56 100644 --- a/src/video_core/shader/async_shaders.h +++ b/src/video_core/shader/async_shaders.h | |||
| @@ -9,16 +9,7 @@ | |||
| 9 | #include <shared_mutex> | 9 | #include <shared_mutex> |
| 10 | #include <thread> | 10 | #include <thread> |
| 11 | 11 | ||
| 12 | // This header includes both Vulkan and OpenGL headers, this has to be fixed | ||
| 13 | // Unfortunately, including OpenGL will include Windows.h that defines macros that can cause issues. | ||
| 14 | // Forcefully include glad early and undefine macros | ||
| 15 | #include <glad/glad.h> | 12 | #include <glad/glad.h> |
| 16 | #ifdef CreateEvent | ||
| 17 | #undef CreateEvent | ||
| 18 | #endif | ||
| 19 | #ifdef CreateSemaphore | ||
| 20 | #undef CreateSemaphore | ||
| 21 | #endif | ||
| 22 | 13 | ||
| 23 | #include "common/common_types.h" | 14 | #include "common/common_types.h" |
| 24 | #include "video_core/renderer_opengl/gl_device.h" | 15 | #include "video_core/renderer_opengl/gl_device.h" |
diff --git a/src/video_core/shader/decode/other.cpp b/src/video_core/shader/decode/other.cpp index d3ea07aac..5f88537bc 100644 --- a/src/video_core/shader/decode/other.cpp +++ b/src/video_core/shader/decode/other.cpp | |||
| @@ -76,6 +76,7 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { | |||
| 76 | case SystemVariable::InvocationId: | 76 | case SystemVariable::InvocationId: |
| 77 | return Operation(OperationCode::InvocationId); | 77 | return Operation(OperationCode::InvocationId); |
| 78 | case SystemVariable::Ydirection: | 78 | case SystemVariable::Ydirection: |
| 79 | uses_y_negate = true; | ||
| 79 | return Operation(OperationCode::YNegate); | 80 | return Operation(OperationCode::YNegate); |
| 80 | case SystemVariable::InvocationInfo: | 81 | case SystemVariable::InvocationInfo: |
| 81 | LOG_WARNING(HW_GPU, "S2R instruction with InvocationInfo is incomplete"); | 82 | LOG_WARNING(HW_GPU, "S2R instruction with InvocationInfo is incomplete"); |
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index 0c6ab0f07..1cd7c14d7 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h | |||
| @@ -139,6 +139,10 @@ public: | |||
| 139 | return uses_legacy_varyings; | 139 | return uses_legacy_varyings; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | bool UsesYNegate() const { | ||
| 143 | return uses_y_negate; | ||
| 144 | } | ||
| 145 | |||
| 142 | bool UsesWarps() const { | 146 | bool UsesWarps() const { |
| 143 | return uses_warps; | 147 | return uses_warps; |
| 144 | } | 148 | } |
| @@ -465,6 +469,7 @@ private: | |||
| 465 | bool uses_instance_id{}; | 469 | bool uses_instance_id{}; |
| 466 | bool uses_vertex_id{}; | 470 | bool uses_vertex_id{}; |
| 467 | bool uses_legacy_varyings{}; | 471 | bool uses_legacy_varyings{}; |
| 472 | bool uses_y_negate{}; | ||
| 468 | bool uses_warps{}; | 473 | bool uses_warps{}; |
| 469 | bool uses_indexed_samplers{}; | 474 | bool uses_indexed_samplers{}; |
| 470 | 475 | ||