aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2020-04-15 16:43:22 +0200
committerMarge Bot <[email protected]>2020-04-28 08:06:33 +0000
commitf102301cc48913a5d61e20705218e49653b737df (patch)
tree26597d8e87260eb5bdd12fb51385f77fdddbbe41 /src/gallium
parentf7df2c57a207a386ba0d2130541ac9d0546670e1 (diff)
r600/sfn: derive the GS from the vertex stage for a common interface
The GS can also provide the primid Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_shader_geometry.cpp4
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_shader_geometry.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_geometry.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_geometry.cpp
index f6ee95e4912..878e54e0630 100644
--- a/src/gallium/drivers/r600/sfn/sfn_shader_geometry.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_shader_geometry.cpp
@@ -34,8 +34,8 @@ namespace r600 {
GeometryShaderFromNir::GeometryShaderFromNir(r600_pipe_shader *sh,
r600_pipe_shader_selector &sel,
const r600_shader_key &key):
- ShaderFromNirProcessor (PIPE_SHADER_GEOMETRY, sel, sh->shader,
- sh->scratch_space_needed),
+ VertexStage(PIPE_SHADER_GEOMETRY, sel, sh->shader,
+ sh->scratch_space_needed),
m_pipe_shader(sh),
m_so_info(&sel.so),
m_first_vertex_emitted(false),
diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_geometry.h b/src/gallium/drivers/r600/sfn/sfn_shader_geometry.h
index 9f7f69f6925..cacbdaf50b7 100644
--- a/src/gallium/drivers/r600/sfn/sfn_shader_geometry.h
+++ b/src/gallium/drivers/r600/sfn/sfn_shader_geometry.h
@@ -28,17 +28,18 @@
#ifndef SFN_GEOMETRYSHADERFROMNIR_H
#define SFN_GEOMETRYSHADERFROMNIR_H
-#include "sfn_shader_base.h"
+#include "sfn_vertexstageexport.h"
namespace r600 {
-class GeometryShaderFromNir : public ShaderFromNirProcessor
+class GeometryShaderFromNir : public VertexStage
{
public:
GeometryShaderFromNir(r600_pipe_shader *sh, r600_pipe_shader_selector& sel, const r600_shader_key& key);
bool do_emit_load_deref(const nir_variable *in_var, nir_intrinsic_instr* instr) override;
bool do_emit_store_deref(const nir_variable *out_var, nir_intrinsic_instr* instr) override;
bool scan_sysvalue_access(nir_instr *instr) override;
+ PValue primitive_id() override {return m_primitive_id;}
private:
struct ArrayDeref {