summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-11-30 10:52:23 +1000
committerDave Airlie <[email protected]>2015-12-07 09:59:00 +1000
commit797012bb67be78b3907d39626900e55f179f3792 (patch)
treeb4c7be1034015379f2ed8c047a169d94f9f5ce6a
parent382e2a2901015b75acecdbbbdb180cf605181ed2 (diff)
r600/sb: add LS/HS hw shader types.
This just adds printing for the hw shader types, and hooks it up. Reviewed-by: Glenn Kennard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc.h2
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc_parser.cpp6
-rw-r--r--src/gallium/drivers/r600/sb/sb_shader.cpp4
3 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_bc.h b/src/gallium/drivers/r600/sb/sb_bc.h
index b23d4820b19..696160098b5 100644
--- a/src/gallium/drivers/r600/sb/sb_bc.h
+++ b/src/gallium/drivers/r600/sb/sb_bc.h
@@ -174,6 +174,8 @@ enum shader_target
TARGET_GS_COPY,
TARGET_COMPUTE,
TARGET_FETCH,
+ TARGET_HS,
+ TARGET_LS,
TARGET_NUM
};
diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
index 28ebfa2ce62..65aa801fb79 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
@@ -58,10 +58,12 @@ int bc_parser::decode() {
switch (bc->type) {
case TGSI_PROCESSOR_FRAGMENT: t = TARGET_PS; break;
case TGSI_PROCESSOR_VERTEX:
- t = pshader->vs_as_es ? TARGET_ES : TARGET_VS;
+ t = pshader->vs_as_ls ? TARGET_LS : (pshader->vs_as_es ? TARGET_ES : TARGET_VS);
break;
case TGSI_PROCESSOR_GEOMETRY: t = TARGET_GS; break;
case TGSI_PROCESSOR_COMPUTE: t = TARGET_COMPUTE; break;
+ case TGSI_PROCESSOR_TESS_CTRL: t = TARGET_HS; break;
+ case TGSI_PROCESSOR_TESS_EVAL: t = pshader->tes_as_es ? TARGET_ES : TARGET_VS; break;
default: assert(!"unknown shader target"); return -1; break;
}
} else {
@@ -146,7 +148,7 @@ int bc_parser::parse_decls() {
}
}
- if (sh->target == TARGET_VS || sh->target == TARGET_ES)
+ if (sh->target == TARGET_VS || sh->target == TARGET_ES || sh->target == TARGET_HS)
sh->add_input(0, 1, 0x0F);
else if (sh->target == TARGET_GS) {
sh->add_input(0, 1, 0x0F);
diff --git a/src/gallium/drivers/r600/sb/sb_shader.cpp b/src/gallium/drivers/r600/sb/sb_shader.cpp
index 87e28e98157..8c7b39bb03f 100644
--- a/src/gallium/drivers/r600/sb/sb_shader.cpp
+++ b/src/gallium/drivers/r600/sb/sb_shader.cpp
@@ -215,7 +215,7 @@ void shader::init() {
void shader::init_call_fs(cf_node* cf) {
unsigned gpr = 0;
- assert(target == TARGET_VS || target == TARGET_ES);
+ assert(target == TARGET_LS || target == TARGET_VS || target == TARGET_ES);
for(inputs_vec::const_iterator I = inputs.begin(),
E = inputs.end(); I != E; ++I, ++gpr) {
@@ -436,6 +436,8 @@ const char* shader::get_shader_target_name() {
case TARGET_ES: return "ES";
case TARGET_PS: return "PS";
case TARGET_GS: return "GS";
+ case TARGET_HS: return "HS";
+ case TARGET_LS: return "LS";
case TARGET_COMPUTE: return "COMPUTE";
case TARGET_FETCH: return "FETCH";
default: