[Mesa-dev] [PATCH 1/5] svga: s/unsigned/enum tgsi_semantic/
Brian Paul
brianp at vmware.com
Mon Jul 10 21:50:21 UTC 2017
Makes gdb debugging a little nicer.
---
src/gallium/drivers/svga/svga_link.c | 2 +-
src/gallium/drivers/svga/svga_pipe_streamout.c | 3 ++-
src/gallium/drivers/svga/svga_swtnl_state.c | 2 +-
src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 11 ++++++-----
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/gallium/drivers/svga/svga_link.c b/src/gallium/drivers/svga/svga_link.c
index 5bc7f61..9c1df0c 100644
--- a/src/gallium/drivers/svga/svga_link.c
+++ b/src/gallium/drivers/svga/svga_link.c
@@ -62,7 +62,7 @@ svga_link_shaders(const struct tgsi_shader_info *outshader_info,
free_slot = outshader_info->num_outputs + 1;
for (i = 0; i < inshader_info->num_inputs; i++) {
- unsigned sem_name = inshader_info->input_semantic_name[i];
+ enum tgsi_semantic sem_name = inshader_info->input_semantic_name[i];
unsigned sem_index = inshader_info->input_semantic_index[i];
unsigned j;
/**
diff --git a/src/gallium/drivers/svga/svga_pipe_streamout.c b/src/gallium/drivers/svga/svga_pipe_streamout.c
index 3f30e64..0c6c034 100644
--- a/src/gallium/drivers/svga/svga_pipe_streamout.c
+++ b/src/gallium/drivers/svga/svga_pipe_streamout.c
@@ -92,7 +92,8 @@ svga_create_stream_output(struct svga_context *svga,
for (i = 0; i < info->num_outputs; i++) {
unsigned reg_idx = info->output[i].register_index;
unsigned buf_idx = info->output[i].output_buffer;
- const unsigned sem_name = shader->info.output_semantic_name[reg_idx];
+ const enum tgsi_semantic sem_name =
+ shader->info.output_semantic_name[reg_idx];
assert(buf_idx <= PIPE_MAX_SO_BUFFERS);
diff --git a/src/gallium/drivers/svga/svga_swtnl_state.c b/src/gallium/drivers/svga/svga_swtnl_state.c
index 71faf3a..8b7a8e7 100644
--- a/src/gallium/drivers/svga/svga_swtnl_state.c
+++ b/src/gallium/drivers/svga/svga_swtnl_state.c
@@ -253,7 +253,7 @@ svga_swtnl_update_vdecl( struct svga_context *svga )
nr_decls++;
for (i = 0; i < fs->base.info.num_inputs; i++) {
- const unsigned sem_name = fs->base.info.input_semantic_name[i];
+ const enum tgsi_semantic sem_name = fs->base.info.input_semantic_name[i];
const unsigned sem_index = fs->base.info.input_semantic_index[i];
src = draw_find_shader_output(draw, sem_name, sem_index);
diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
index 1dd76cc..070d67f 100644
--- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
+++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
@@ -851,7 +851,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit,
{
unsigned file = reg->Register.File;
unsigned index = reg->Register.Index;
- const unsigned sem_name = emit->info.output_semantic_name[index];
+ const enum tgsi_semantic sem_name = emit->info.output_semantic_name[index];
const unsigned sem_index = emit->info.output_semantic_index[index];
unsigned writemask = reg->Register.WriteMask;
const unsigned indirect = reg->Register.Indirect;
@@ -2178,7 +2178,7 @@ emit_fragdepth_output_declaration(struct svga_shader_emitter_v10 *emit)
*/
static void
emit_system_value_declaration(struct svga_shader_emitter_v10 *emit,
- unsigned semantic_name, unsigned index)
+ enum tgsi_semantic semantic_name, unsigned index)
{
switch (semantic_name) {
case TGSI_SEMANTIC_INSTANCEID:
@@ -2345,7 +2345,7 @@ emit_input_declarations(struct svga_shader_emitter_v10 *emit)
if (emit->unit == PIPE_SHADER_FRAGMENT) {
for (i = 0; i < emit->linkage.num_inputs; i++) {
- unsigned semantic_name = emit->info.input_semantic_name[i];
+ enum tgsi_semantic semantic_name = emit->info.input_semantic_name[i];
unsigned usage_mask = emit->info.input_usage_mask[i];
unsigned index = emit->linkage.input_map[i];
unsigned type, interpolationMode, name;
@@ -2404,7 +2404,7 @@ emit_input_declarations(struct svga_shader_emitter_v10 *emit)
else if (emit->unit == PIPE_SHADER_GEOMETRY) {
for (i = 0; i < emit->info.num_inputs; i++) {
- unsigned semantic_name = emit->info.input_semantic_name[i];
+ enum tgsi_semantic semantic_name = emit->info.input_semantic_name[i];
unsigned usage_mask = emit->info.input_usage_mask[i];
unsigned index = emit->linkage.input_map[i];
unsigned opcodeType, operandType;
@@ -2487,7 +2487,8 @@ emit_output_declarations(struct svga_shader_emitter_v10 *emit)
for (i = 0; i < emit->info.num_outputs; i++) {
/*const unsigned usage_mask = emit->info.output_usage_mask[i];*/
- const unsigned semantic_name = emit->info.output_semantic_name[i];
+ const enum tgsi_semantic semantic_name =
+ emit->info.output_semantic_name[i];
const unsigned semantic_index = emit->info.output_semantic_index[i];
unsigned index = i;
--
1.9.1
More information about the mesa-dev
mailing list