diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-08-23 18:04:05 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-08-23 18:34:09 +0200 |
commit | 838638817eeff5b0b5e261e515462bc29a61cb61 (patch) | |
tree | 0db453cb88ed0cd22d36b30543b00cb74df8cc54 | |
parent | c5d8dcdabd6ac60b460b826184f3d67ae1250439 (diff) |
nine: always generate two-dimensional constant file accesses
-rw-r--r-- | src/gallium/state_trackers/nine/nine_ff.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_shader.c | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index 2175bdbcc5..39fcb8b159 100644 --- a/src/gallium/state_trackers/nine/nine_ff.c +++ b/src/gallium/state_trackers/nine/nine_ff.c @@ -483,7 +483,7 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) for (i = 0; i < key->vertexblend; ++i) { for (c = 0; c < 4; ++c) { - cWM[c] = ureg_src_register(TGSI_FILE_CONSTANT, (160 + i * 4) * !key->vertexblend_indexed + c); + cWM[c] = ureg_src_dimension(ureg_src_register(TGSI_FILE_CONSTANT, (160 + i * 4) * !key->vertexblend_indexed + c), 0); if (key->vertexblend_indexed) cWM[c] = ureg_src_indirect(cWM[c], ureg_scalar(ureg_src(AR), i)); } diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 5b60dcbac8..cc667ebfbc 100644 --- a/src/gallium/state_trackers/nine/nine_shader.c +++ b/src/gallium/state_trackers/nine/nine_shader.c @@ -91,7 +91,7 @@ static inline const char *d3dsio_to_string(unsigned opcode); TGSI_SWIZZLE_##x, TGSI_SWIZZLE_##y, TGSI_SWIZZLE_##z, TGSI_SWIZZLE_##w #define NINE_CONSTANT_SRC(index) \ - ureg_src_register(TGSI_FILE_CONSTANT, index) + ureg_src_dimension(ureg_src_register(TGSI_FILE_CONSTANT, index), 0) #define NINE_APPLY_SWIZZLE(src, s) \ ureg_swizzle(src, NINE_SWIZZLE4(s, s, s, s)) @@ -1009,7 +1009,7 @@ tx_src_param(struct shader_translator *tx, const struct sm1_src_param *param) src = ureg_src_dimension(src, 0); } } else - src = ureg_src_register(TGSI_FILE_CONSTANT, param->idx); + src = NINE_CONSTANT_SRC(param->idx); } if (!IS_VS && tx->version.major < 2) { /* ps 1.X clamps constants */ @@ -1035,8 +1035,7 @@ tx_src_param(struct shader_translator *tx, const struct sm1_src_param *param) src = ureg_src_register(TGSI_FILE_CONSTANT, param->idx); src = ureg_src_dimension(src, 2); } else - src = ureg_src_register(TGSI_FILE_CONSTANT, - tx->info->const_i_base + param->idx); + src = NINE_CONSTANT_SRC(tx->info->const_i_base + param->idx); } break; case D3DSPR_CONSTBOOL: @@ -1049,8 +1048,7 @@ tx_src_param(struct shader_translator *tx, const struct sm1_src_param *param) src = ureg_src_register(TGSI_FILE_CONSTANT, r); src = ureg_src_dimension(src, 3); } else - src = ureg_src_register(TGSI_FILE_CONSTANT, - tx->info->const_b_base + r); + src = NINE_CONSTANT_SRC(tx->info->const_b_base + r); src = ureg_swizzle(src, s, s, s, s); } break; |