diff options
author | Brian Paul <brianp@vmware.com> | 2015-10-08 21:06:18 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2015-10-16 11:43:28 -0600 |
commit | f413f1a17c506d5d4474a1baa0556a9e9f554c63 (patch) | |
tree | d964837bc9636e1850251a06bbca03c60ce783c5 /src | |
parent | 8d0d5dca5bd076ef363d3e923e6473916f3a9d35 (diff) | |
download | external_mesa3d-f413f1a17c506d5d4474a1baa0556a9e9f554c63.zip external_mesa3d-f413f1a17c506d5d4474a1baa0556a9e9f554c63.tar.gz external_mesa3d-f413f1a17c506d5d4474a1baa0556a9e9f554c63.tar.bz2 |
svga: use new svga_new_shader_variant() function
To simplify upcoming new HUD shader count implementation.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/svga/svga_shader.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_shader.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c index d46e7eb..7b84755 100644 --- a/src/gallium/drivers/svga/svga_shader.c +++ b/src/gallium/drivers/svga/svga_shader.c @@ -414,6 +414,13 @@ svga_set_shader(struct svga_context *svga, } +struct svga_shader_variant * +svga_new_shader_variant(struct svga_context *svga) +{ + return CALLOC_STRUCT(svga_shader_variant); +} + + enum pipe_error svga_destroy_shader_variant(struct svga_context *svga, SVGA3dShaderType type, diff --git a/src/gallium/drivers/svga/svga_shader.h b/src/gallium/drivers/svga/svga_shader.h index b0800c1..efcac40 100644 --- a/src/gallium/drivers/svga/svga_shader.h +++ b/src/gallium/drivers/svga/svga_shader.h @@ -273,6 +273,9 @@ svga_set_shader(struct svga_context *svga, SVGA3dShaderType type, struct svga_shader_variant *variant); +struct svga_shader_variant * +svga_new_shader_variant(struct svga_context *svga); + enum pipe_error svga_destroy_shader_variant(struct svga_context *svga, SVGA3dShaderType type, diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c index a047570..202eee2 100644 --- a/src/gallium/drivers/svga/svga_tgsi.c +++ b/src/gallium/drivers/svga/svga_tgsi.c @@ -228,7 +228,7 @@ svga_tgsi_vgpu9_translate(struct svga_context *svga, goto fail; } - variant = CALLOC_STRUCT(svga_shader_variant); + variant = svga_new_shader_variant(svga); if (variant == NULL) goto fail; diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index e4f027b..d62f2bb 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -6735,7 +6735,7 @@ svga_tgsi_vgpu10_translate(struct svga_context *svga, /* * Create, initialize the 'variant' object. */ - variant = CALLOC_STRUCT(svga_shader_variant); + variant = svga_new_shader_variant(svga); if (!variant) goto cleanup; |