summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_shader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_shader.c')
-rw-r--r--src/gallium/drivers/svga/svga_shader.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c
index d46e7ebbc38..5c99e16d976 100644
--- a/src/gallium/drivers/svga/svga_shader.c
+++ b/src/gallium/drivers/svga/svga_shader.c
@@ -414,6 +414,14 @@ svga_set_shader(struct svga_context *svga,
}
+struct svga_shader_variant *
+svga_new_shader_variant(struct svga_context *svga)
+{
+ svga->hud.num_shaders++;
+ return CALLOC_STRUCT(svga_shader_variant);
+}
+
+
enum pipe_error
svga_destroy_shader_variant(struct svga_context *svga,
SVGA3dShaderType type,
@@ -455,6 +463,8 @@ svga_destroy_shader_variant(struct svga_context *svga,
FREE((unsigned *)variant->tokens);
FREE(variant);
+ svga->hud.num_shaders--;
+
return ret;
}