diff options
| author | 2021-03-20 19:11:56 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:23 -0400 | |
| commit | 76c8a962ac4eae77e71d66a72c448930240339f9 (patch) | |
| tree | 267bdb72f0fad43779080cd1907dd8159a6c7154 /src/shader_recompiler/ir_opt | |
| parent | shader: Refactor half floating instructions (diff) | |
| download | yuzu-76c8a962ac4eae77e71d66a72c448930240339f9.tar.gz yuzu-76c8a962ac4eae77e71d66a72c448930240339f9.tar.xz yuzu-76c8a962ac4eae77e71d66a72c448930240339f9.zip | |
spirv: Implement VertexId and InstanceId, refactor code
Diffstat (limited to 'src/shader_recompiler/ir_opt')
| -rw-r--r-- | src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp index e72505d61..e7fa3fce0 100644 --- a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp +++ b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp | |||
| @@ -38,6 +38,12 @@ void GetAttribute(Info& info, IR::Attribute attribute) { | |||
| 38 | case IR::Attribute::PositionW: | 38 | case IR::Attribute::PositionW: |
| 39 | info.loads_position = true; | 39 | info.loads_position = true; |
| 40 | break; | 40 | break; |
| 41 | case IR::Attribute::InstanceId: | ||
| 42 | info.loads_instance_id = true; | ||
| 43 | break; | ||
| 44 | case IR::Attribute::VertexId: | ||
| 45 | info.loads_vertex_id = true; | ||
| 46 | break; | ||
| 41 | default: | 47 | default: |
| 42 | throw NotImplementedException("Get attribute {}", attribute); | 48 | throw NotImplementedException("Get attribute {}", attribute); |
| 43 | } | 49 | } |