summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-10-02 16:36:51 +0200
committerMarek Olšák <[email protected]>2014-10-04 15:36:39 +0200
commit0c4bc1e29223ffec4617999c0c03d722bdcc170a (patch)
treeecae2a4b7708df339d2189a156357a9d4aa2452c /src/gallium/auxiliary
parent1f6c0b55df9f3553b18062ad2c7e2dc021d4c731 (diff)
tgsi: change tgsi_shader_info::properties to a one-dimensional array
Reviewed-by: Roland Scheidegger <[email protected]> v2: fix svga too
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.c6
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c5
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.h2
-rw-r--r--src/gallium/auxiliary/util/u_pstipple.c2
5 files changed, 8 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
index 0c2f8922dc5..40f7ed352d9 100644
--- a/src/gallium/auxiliary/draw/draw_gs.c
+++ b/src/gallium/auxiliary/draw/draw_gs.c
@@ -766,11 +766,11 @@ draw_create_geometry_shader(struct draw_context *draw,
}
gs->input_primitive =
- gs->info.properties[TGSI_PROPERTY_GS_INPUT_PRIM][0];
+ gs->info.properties[TGSI_PROPERTY_GS_INPUT_PRIM];
gs->output_primitive =
- gs->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM][0];
+ gs->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM];
gs->max_output_vertices =
- gs->info.properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES][0];
+ gs->info.properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES];
if (!gs->max_output_vertices)
gs->max_output_vertices = 32;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 2d7f32d308d..05618bc1e6e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -3865,7 +3865,7 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
bld.bld_base.op_actions[TGSI_OPCODE_ENDPRIM].emit = end_primitive;
max_output_vertices =
- info->properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES][0];
+ info->properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES];
if (!max_output_vertices)
max_output_vertices = 32;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index d68dca81713..42bc61eeb4c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -280,8 +280,7 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
unsigned name = fullprop->Property.PropertyName;
assert(name < Elements(info->properties));
- memcpy(info->properties[name],
- fullprop->u, 8 * sizeof(unsigned));
+ info->properties[name] = fullprop->u[0].Data;
}
break;
@@ -298,7 +297,7 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
*/
if (procType == TGSI_PROCESSOR_GEOMETRY) {
unsigned input_primitive =
- info->properties[TGSI_PROPERTY_GS_INPUT_PRIM][0];
+ info->properties[TGSI_PROPERTY_GS_INPUT_PRIM];
int num_verts = u_vertices_per_prim(input_primitive);
int j;
info->file_count[TGSI_FILE_INPUT] = num_verts;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
index 934aceca4c6..b02b018b633 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -88,7 +88,7 @@ struct tgsi_shader_info
*/
unsigned indirect_files;
- unsigned properties[TGSI_PROPERTY_COUNT][8]; /* index with TGSI_PROPERTY_ */
+ unsigned properties[TGSI_PROPERTY_COUNT]; /* index with TGSI_PROPERTY_ */
};
extern void
diff --git a/src/gallium/auxiliary/util/u_pstipple.c b/src/gallium/auxiliary/util/u_pstipple.c
index ce1fe5dc683..509f815c53a 100644
--- a/src/gallium/auxiliary/util/u_pstipple.c
+++ b/src/gallium/auxiliary/util/u_pstipple.c
@@ -433,7 +433,7 @@ util_pstipple_create_fragment_shader(struct pipe_context *pipe,
tgsi_scan_shader(fs->tokens, &transform.info);
transform.coordOrigin =
- transform.info.properties[TGSI_PROPERTY_FS_COORD_ORIGIN][0];
+ transform.info.properties[TGSI_PROPERTY_FS_COORD_ORIGIN];
tgsi_transform_shader(fs->tokens,
(struct tgsi_token *) new_fs->tokens,