aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl/gl_device.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-07-07 20:36:42 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-07-07 20:42:55 -0300
commitc9d886c84e4102f7b9c464c704eecb61d37b3df4 (patch)
treec26dadd5ead8fb3d9b8241cc8b9d6f97dd9d98f4 /src/video_core/renderer_opengl/gl_device.h
parent8070cb3f6b33a71812c567ba144045a54bf1ba54 (diff)
gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders
This commit implements gl_ViewportIndex and gl_Layer in vertex and geometry shaders. In the case it's used in a vertex shader, it requires ARB_shader_viewport_layer_array. This extension is available on AMD and Nvidia devices (mesa and proprietary drivers), but not available on Intel on any platform. At the moment of writing this description I don't know if this is a hardware limitation or a driver limitation. In the case that ARB_shader_viewport_layer_array is not available, writes to these registers on a vertex shader are ignored, with the appropriate logging.
Diffstat (limited to 'src/video_core/renderer_opengl/gl_device.h')
-rw-r--r--src/video_core/renderer_opengl/gl_device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h
index 8c8c93760..7a3a0675b 100644
--- a/src/video_core/renderer_opengl/gl_device.h
+++ b/src/video_core/renderer_opengl/gl_device.h
@@ -26,6 +26,10 @@ public:
return max_varyings;
}
+ bool HasVertexViewportLayer() const {
+ return has_vertex_viewport_layer;
+ }
+
bool HasVariableAoffi() const {
return has_variable_aoffi;
}
@@ -41,6 +45,7 @@ private:
std::size_t uniform_buffer_alignment{};
u32 max_vertex_attributes{};
u32 max_varyings{};
+ bool has_vertex_viewport_layer{};
bool has_variable_aoffi{};
bool has_component_indexing_bug{};
};