summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-12-21 16:52:58 +1000
committerDave Airlie <airlied@redhat.com>2016-02-19 11:17:57 +1000
commit65f1d74320259ec7a31f4d6bd659961cd7155418 (patch)
treeb387a45dcc235715e2e7f11bcdcd28ef9ad22778
parent447bca783ad5c6bc872009988be76ae2ce178f1f (diff)
bits of tess
-rw-r--r--src/vrend_renderer.c8
-rw-r--r--src/vrend_shader.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 1d25749..057d371 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -2154,7 +2154,7 @@ int vrend_create_shader(struct vrend_context *ctx,
bool finished = false;
int ret;
- if (type > PIPE_SHADER_GEOMETRY)
+ if (type > PIPE_SHADER_TESS_EVAL)
return EINVAL;
if (offlen & VIRGL_OBJ_SHADER_OFFSET_CONT)
@@ -2270,7 +2270,7 @@ void vrend_bind_shader(struct vrend_context *ctx,
{
struct vrend_shader_selector *sel;
- if (type > PIPE_SHADER_GEOMETRY)
+ if (type > PIPE_SHADER_TESS_EVAL)
return;
if (handle == 0) {
@@ -3867,6 +3867,8 @@ static void vrend_destroy_sub_context(struct vrend_sub_context *sub)
vrend_shader_state_reference(&sub->shaders[PIPE_SHADER_VERTEX], NULL);
vrend_shader_state_reference(&sub->shaders[PIPE_SHADER_FRAGMENT], NULL);
vrend_shader_state_reference(&sub->shaders[PIPE_SHADER_GEOMETRY], NULL);
+ vrend_shader_state_reference(&sub->shaders[PIPE_SHADER_TESS_CTRL], NULL);
+ vrend_shader_state_reference(&sub->shaders[PIPE_SHADER_TESS_EVAL], NULL);
vrend_free_programs(sub);
for (i = 0; i < PIPE_SHADER_TYPES; i++) {
@@ -3918,6 +3920,8 @@ bool vrend_destroy_context(struct vrend_context *ctx)
vrend_set_num_sampler_views(ctx, PIPE_SHADER_VERTEX, 0, 0);
vrend_set_num_sampler_views(ctx, PIPE_SHADER_FRAGMENT, 0, 0);
vrend_set_num_sampler_views(ctx, PIPE_SHADER_GEOMETRY, 0, 0);
+ vrend_set_num_sampler_views(ctx, PIPE_SHADER_TESS_CTRL, 0, 0);
+ vrend_set_num_sampler_views(ctx, PIPE_SHADER_TESS_EVAL, 0, 0);
vrend_set_streamout_targets(ctx, 0, 0, NULL);
vrend_set_num_vbo(ctx, 0);
diff --git a/src/vrend_shader.c b/src/vrend_shader.c
index c4cba34..6b8df98 100644
--- a/src/vrend_shader.c
+++ b/src/vrend_shader.c
@@ -155,6 +155,8 @@ static inline const char *tgsi_proc_to_prefix(int shader_type)
case TGSI_PROCESSOR_VERTEX: return "vs";
case TGSI_PROCESSOR_FRAGMENT: return "fs";
case TGSI_PROCESSOR_GEOMETRY: return "gs";
+ case TGSI_PROCESSOR_TESS_CTRL: return "tc";
+ case TGSI_PROCESSOR_TESS_EVAL: return "te";
default:
return NULL;
};