summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-01-31 17:31:23 +0100
committerMarek Olšák <[email protected]>2015-02-04 14:34:13 +0100
commitafe1e6acdd7f430b0be4f0bd5af3b1c0dbf6e453 (patch)
treeb9260b696cd05cb08fbbde7664395060d7221b50 /src/gallium/drivers
parent50908a89188ee7f079551622cbc8a37c04e8e8ac (diff)
radeonsi: don't use tgsi_parse_context to get processor type
Also remove unused "tokens". Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 4b1279cc26b..52f1fa4acae 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -63,8 +63,6 @@ struct si_shader_output_values
struct si_shader_context
{
struct radeon_llvm_context radeon_bld;
- struct tgsi_parse_context parse;
- struct tgsi_token * tokens;
struct si_shader *shader;
struct si_screen *screen;
unsigned type; /* TGSI_PROCESSOR_* specifies the type of shader. */
@@ -2800,10 +2798,8 @@ int si_shader_create(struct si_screen *sscreen, struct si_shader *shader)
}
si_shader_ctx.radeon_bld.load_system_value = declare_system_value;
- si_shader_ctx.tokens = sel->tokens;
- tgsi_parse_init(&si_shader_ctx.parse, si_shader_ctx.tokens);
si_shader_ctx.shader = shader;
- si_shader_ctx.type = si_shader_ctx.parse.FullHeader.Processor.Processor;
+ si_shader_ctx.type = tgsi_get_processor_type(sel->tokens);
si_shader_ctx.screen = sscreen;
switch (si_shader_ctx.type) {
@@ -2881,8 +2877,6 @@ int si_shader_create(struct si_screen *sscreen, struct si_shader *shader)
}
}
- tgsi_parse_free(&si_shader_ctx.parse);
-
out:
for (int i = 0; i < SI_NUM_CONST_BUFFERS; i++)
FREE(si_shader_ctx.constants[i]);