st/nine: constify some variables

Just a nice hint for both peoples and compilers.

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Konstantin Kharlamov 2017-12-29 08:32:29 +03:00 committed by Marek Olšák
parent 77ca550224
commit 1379d9759f
2 changed files with 6 additions and 6 deletions

View File

@ -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,

View File

@ -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);