Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
37c86328
Commit
37c86328
authored
Aug 04, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make some lookup tables const.
parent
2b88b2d3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+5
-5
glsl_shader.c
dlls/wined3d/glsl_shader.c
+5
-7
shader.c
dlls/wined3d/shader.c
+2
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
37c86328
...
...
@@ -3412,7 +3412,7 @@ static const DWORD *find_loop_control_values(IWineD3DBaseShaderImpl *This, DWORD
static
void
init_ps_input
(
const
IWineD3DPixelShaderImpl
*
This
,
const
struct
arb_ps_compile_args
*
args
,
struct
shader_arb_ctx_priv
*
priv
)
{
const
char
*
texcoords
[
8
]
=
static
const
char
*
const
texcoords
[
8
]
=
{
"fragment.texcoord[0]"
,
"fragment.texcoord[1]"
,
"fragment.texcoord[2]"
,
"fragment.texcoord[3]"
,
"fragment.texcoord[4]"
,
"fragment.texcoord[5]"
,
"fragment.texcoord[6]"
,
"fragment.texcoord[7]"
...
...
@@ -3894,7 +3894,7 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu
struct
arb_vs_compiled_shader
*
compiled
)
{
unsigned
int
i
,
j
;
static
const
char
*
texcoords
[
8
]
=
static
const
char
*
const
texcoords
[
8
]
=
{
"result.texcoord[0]"
,
"result.texcoord[1]"
,
"result.texcoord[2]"
,
"result.texcoord[3]"
,
"result.texcoord[4]"
,
"result.texcoord[5]"
,
"result.texcoord[6]"
,
"result.texcoord[7]"
...
...
@@ -3908,10 +3908,10 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu
/* Write generic input varyings 0 to 7 to result.texcoord[], varying 8 to result.color.primary
* and varying 9 to result.color.secondary
*/
const
char
*
decl_idx_to_string
[
MAX_REG_INPUT
]
=
static
const
char
*
const
decl_idx_to_string
[
MAX_REG_INPUT
]
=
{
texcoords
[
0
],
texcoords
[
1
],
texcoords
[
2
],
texcoords
[
3
]
,
texcoords
[
4
],
texcoords
[
5
],
texcoords
[
6
],
texcoords
[
7
]
,
"result.texcoord[0]"
,
"result.texcoord[1]"
,
"result.texcoord[2]"
,
"result.texcoord[3]"
,
"result.texcoord[4]"
,
"result.texcoord[5]"
,
"result.texcoord[6]"
,
"result.texcoord[7]"
,
"result.color.primary"
,
"result.color.secondary"
};
...
...
dlls/wined3d/glsl_shader.c
View file @
37c86328
...
...
@@ -4462,18 +4462,16 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info,
GLhandleARB
vshader_id
,
pshader_id
;
const
char
*
blt_pshader
;
static
const
char
*
blt_vshader
[]
=
{
static
const
char
*
blt_vshader
=
"#version 120
\n
"
"void main(void)
\n
"
"{
\n
"
" gl_Position = gl_Vertex;
\n
"
" gl_FrontColor = vec4(1.0);
\n
"
" gl_TexCoord[0] = gl_MultiTexCoord0;
\n
"
"}
\n
"
};
"}
\n
"
;
static
const
char
*
blt_pshaders_full
[
tex_type_count
]
=
static
const
char
*
const
blt_pshaders_full
[
tex_type_count
]
=
{
/* tex_1d */
NULL
,
...
...
@@ -4503,7 +4501,7 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info,
"}
\n
"
,
};
static
const
char
*
blt_pshaders_masked
[
tex_type_count
]
=
static
const
char
*
const
blt_pshaders_masked
[
tex_type_count
]
=
{
/* tex_1d */
NULL
,
...
...
@@ -4547,7 +4545,7 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info,
}
vshader_id
=
GL_EXTCALL
(
glCreateShaderObjectARB
(
GL_VERTEX_SHADER_ARB
));
GL_EXTCALL
(
glShaderSourceARB
(
vshader_id
,
1
,
blt_vshader
,
NULL
));
GL_EXTCALL
(
glShaderSourceARB
(
vshader_id
,
1
,
&
blt_vshader
,
NULL
));
GL_EXTCALL
(
glCompileShaderARB
(
vshader_id
));
pshader_id
=
GL_EXTCALL
(
glCreateShaderObjectARB
(
GL_FRAGMENT_SHADER_ARB
));
...
...
dlls/wined3d/shader.c
View file @
37c86328
...
...
@@ -33,7 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_shader
);
WINE_DECLARE_DEBUG_CHANNEL
(
d3d
);
static
const
char
*
shader_opcode_names
[]
=
static
const
char
*
const
shader_opcode_names
[]
=
{
/* WINED3DSIH_ABS */
"abs"
,
/* WINED3DSIH_ADD */
"add"
,
...
...
@@ -125,7 +125,7 @@ static const char *shader_opcode_names[] =
/* WINED3DSIH_TEXREG2RGB */
"texreg2rgb"
,
};
static
const
char
*
semantic_names
[]
=
static
const
char
*
const
semantic_names
[]
=
{
/* WINED3DDECLUSAGE_POSITION */
"SV_POSITION"
,
/* WINED3DDECLUSAGE_BLENDWEIGHT */
"BLENDWEIGHT"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment