svga: use new svga_new_shader_variant() function
To simplify upcoming new HUD shader count implementation. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user