Commit d77b81ce authored by Gert Wollny's avatar Gert Wollny Committed by Marge Bot

r600/sfn: Add lowering passes for Tesselation IO

Lower the input and output intrinsics to r600 specific LDS intrinsics
Signed-off-by: Gert Wollny's avatarGert Wollny <gert.wollny@collabora.com>
Part-of: <mesa/mesa!4714>
parent 1b3e103d
......@@ -134,6 +134,7 @@ CXX_SOURCES = \
sfn/sfn_nir.h \
sfn/sfn_nir_lower_fs_out_to_vector.cpp \
sfn/sfn_nir_lower_fs_out_to_vector.h \
sfn/sfn_nir_lower_tess_io.cpp \
sfn/sfn_nir_vectorize_vs_inputs.c \
sfn/sfn_shader_base.cpp \
sfn/sfn_shader_base.h \
......
......@@ -151,6 +151,7 @@ files_r600 = files(
'sfn/sfn_nir.h',
'sfn/sfn_nir_lower_fs_out_to_vector.cpp',
'sfn/sfn_nir_lower_fs_out_to_vector.h',
'sfn/sfn_nir_lower_tess_io.cpp',
'sfn/sfn_nir_vectorize_vs_inputs.c',
'sfn/sfn_shader_base.cpp',
'sfn/sfn_shader_base.h',
......
......@@ -214,6 +214,8 @@ struct r600_bytecode_cf {
struct r600_bytecode_alu *prev_bs_head;
struct r600_bytecode_alu *prev2_bs_head;
unsigned isa[2];
unsigned nlds_read;
unsigned nqueue_read;
};
#define FC_NONE 0
......
......@@ -28,6 +28,7 @@
#define SFN_NIR_H
#include "nir.h"
#include "nir_builder.h"
#ifdef __cplusplus
#include "sfn_shader_base.h"
......@@ -96,15 +97,33 @@ private:
#endif
static inline nir_ssa_def *
r600_imm_ivec3(nir_builder *build, int x, int y, int z)
{
nir_const_value v[3] = {
nir_const_value_for_int(x, 32),
nir_const_value_for_int(y, 32),
nir_const_value_for_int(z, 32),
};
return nir_build_imm(build, 3, 32, v);
}
bool r600_lower_tess_io(nir_shader *shader, enum pipe_prim_type prim_type);
bool r600_append_tcs_TF_emission(nir_shader *shader, enum pipe_prim_type prim_type);
#ifdef __cplusplus
extern "C" {
#endif
bool r600_vectorize_vs_inputs(nir_shader *shader);
int r600_shader_from_nir(struct r600_context *rctx,
struct r600_pipe_shader *pipeshader,
union r600_shader_key *key);
#ifdef __cplusplus
}
#endif
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment