diff options
author | Konstantin Kharlamov <[email protected]> | 2017-12-29 08:32:29 +0300 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-07-17 14:47:37 -0400 |
commit | 1379d9759fb7f1359b4a43380a0e99f3c2ca5985 (patch) | |
tree | 1c0de0585b6f615aa2f4212dffc3e9643ef2842f /src/gallium/state_trackers | |
parent | 77ca550224515516c780c0f0534d667beab0e891 (diff) |
st/nine: constify some variables
Just a nice hint for both peoples and compilers.
Signed-off-by: Konstantin Kharlamov <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_pipe.h | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_shader.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/nine/nine_pipe.h b/src/gallium/state_trackers/nine/nine_pipe.h index 6bd4a0c8972..c8fef628276 100644 --- a/src/gallium/state_trackers/nine/nine_pipe.h +++ b/src/gallium/state_trackers/nine/nine_pipe.h @@ -201,7 +201,7 @@ compressed_format( D3DFORMAT fmt ) static inline boolean depth_stencil_format( D3DFORMAT fmt ) { - static D3DFORMAT allowed[] = { + static const D3DFORMAT allowed[] = { D3DFMT_D16_LOCKABLE, D3DFMT_D32, D3DFMT_D15S1, diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 422df931c74..7db07d8f693 100644 --- a/src/gallium/state_trackers/nine/nine_shader.c +++ b/src/gallium/state_trackers/nine/nine_shader.c @@ -378,7 +378,7 @@ struct sm1_instruction struct sm1_src_param dst_rel[1]; struct sm1_dst_param dst[1]; - struct sm1_op_info *info; + const struct sm1_op_info *info; }; static void @@ -2901,7 +2901,7 @@ DECL_SPECIAL(COMMENT) #define _OPI(o,t,vv1,vv2,pv1,pv2,d,s,h) \ { D3DSIO_##o, TGSI_OPCODE_##t, { vv1, vv2 }, { pv1, pv2, }, d, s, h } -struct sm1_op_info inst_table[] = +static const struct sm1_op_info inst_table[] = { _OPI(NOP, NOP, V(0,0), V(3,0), V(0,0), V(3,0), 0, 0, SPECIAL(NOP)), /* 0 */ _OPI(MOV, MOV, V(0,0), V(3,0), V(0,0), V(3,0), 1, 1, NULL), @@ -3008,10 +3008,10 @@ struct sm1_op_info inst_table[] = _OPI(BREAKP, BRK, V(0,0), V(3,0), V(2,1), V(3,0), 0, 1, SPECIAL(BREAKP)) }; -struct sm1_op_info inst_phase = +static const struct sm1_op_info inst_phase = _OPI(PHASE, NOP, V(0,0), V(0,0), V(1,4), V(1,4), 0, 0, SPECIAL(PHASE)); -struct sm1_op_info inst_comment = +static const struct sm1_op_info inst_comment = _OPI(COMMENT, NOP, V(0,0), V(3,0), V(0,0), V(3,0), 0, 0, SPECIAL(COMMENT)); static void @@ -3279,7 +3279,7 @@ sm1_parse_instruction(struct shader_translator *tx) struct sm1_instruction *insn = &tx->insn; HRESULT hr; DWORD tok; - struct sm1_op_info *info = NULL; + const struct sm1_op_info *info = NULL; unsigned i; sm1_parse_comments(tx, TRUE); |