summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_pstipple.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-09-30 15:48:22 +0200
committerMarek Olšák <[email protected]>2014-10-04 15:16:14 +0200
commit8908fae243cb4c15a675006a1cc472f6c59b0d43 (patch)
tree144042cc0d57a340427827836ae245a89fa0249c /src/gallium/auxiliary/util/u_pstipple.c
parent5233568861b082ee288d845f447012fa47e8bd1e (diff)
tgsi: simplify shader properties in tgsi_shader_info
Use an array of properties indexed by TGSI_PROPERTY_* definitions.
Diffstat (limited to 'src/gallium/auxiliary/util/u_pstipple.c')
-rw-r--r--src/gallium/auxiliary/util/u_pstipple.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/u_pstipple.c b/src/gallium/auxiliary/util/u_pstipple.c
index 4f2e7023499..ce1fe5dc683 100644
--- a/src/gallium/auxiliary/util/u_pstipple.c
+++ b/src/gallium/auxiliary/util/u_pstipple.c
@@ -407,7 +407,6 @@ util_pstipple_create_fragment_shader(struct pipe_context *pipe,
struct pipe_shader_state *new_fs;
struct pstip_transform_context transform;
const uint newLen = tgsi_num_tokens(fs->tokens) + NUM_NEW_TOKENS;
- unsigned i;
new_fs = MALLOC(sizeof(*new_fs));
if (!new_fs)
@@ -433,11 +432,8 @@ util_pstipple_create_fragment_shader(struct pipe_context *pipe,
tgsi_scan_shader(fs->tokens, &transform.info);
- /* find fragment coordinate origin property */
- for (i = 0; i < transform.info.num_properties; i++) {
- if (transform.info.properties[i].name == TGSI_PROPERTY_FS_COORD_ORIGIN)
- transform.coordOrigin = transform.info.properties[i].data[0];
- }
+ transform.coordOrigin =
+ transform.info.properties[TGSI_PROPERTY_FS_COORD_ORIGIN][0];
tgsi_transform_shader(fs->tokens,
(struct tgsi_token *) new_fs->tokens,