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
d8f6e635
Commit
d8f6e635
authored
Nov 25, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Const correctness fixes for arb_program_shader.c.
parent
cfb3bea8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
22 deletions
+22
-22
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+0
-0
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+2
-1
baseshader.c
dlls/wined3d/baseshader.c
+6
-8
glsl_shader.c
dlls/wined3d/glsl_shader.c
+4
-2
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+2
-1
state.c
dlls/wined3d/state.c
+2
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+6
-9
No files found.
dlls/wined3d/arb_program_shader.c
View file @
d8f6e635
This diff is collapsed.
Click to expand it.
dlls/wined3d/ati_fragment_shader.c
View file @
d8f6e635
...
@@ -1019,7 +1019,8 @@ static void atifs_enable(IWineD3DDevice *iface, BOOL enable) {
...
@@ -1019,7 +1019,8 @@ static void atifs_enable(IWineD3DDevice *iface, BOOL enable) {
}
}
}
}
static
void
atifs_get_caps
(
WINED3DDEVTYPE
devtype
,
WineD3D_GL_Info
*
gl_info
,
struct
fragment_caps
*
caps
)
{
static
void
atifs_get_caps
(
WINED3DDEVTYPE
devtype
,
const
WineD3D_GL_Info
*
gl_info
,
struct
fragment_caps
*
caps
)
{
caps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_DISABLE
|
caps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_DISABLE
|
WINED3DTEXOPCAPS_SELECTARG1
|
WINED3DTEXOPCAPS_SELECTARG1
|
WINED3DTEXOPCAPS_SELECTARG2
|
WINED3DTEXOPCAPS_SELECTARG2
|
...
...
dlls/wined3d/baseshader.c
View file @
d8f6e635
...
@@ -782,12 +782,9 @@ void shader_dump_param(
...
@@ -782,12 +782,9 @@ void shader_dump_param(
Use the shader_header_fct & shader_footer_fct to add strings
Use the shader_header_fct & shader_footer_fct to add strings
that are specific to pixel or vertex functions
that are specific to pixel or vertex functions
NOTE: A description of how to parse tokens can be found on msdn */
NOTE: A description of how to parse tokens can be found on msdn */
void
shader_generate_main
(
void
shader_generate_main
(
IWineD3DBaseShader
*
iface
,
SHADER_BUFFER
*
buffer
,
IWineD3DBaseShader
*
iface
,
const
shader_reg_maps
*
reg_maps
,
CONST
DWORD
*
pFunction
)
SHADER_BUFFER
*
buffer
,
{
shader_reg_maps
*
reg_maps
,
CONST
DWORD
*
pFunction
)
{
IWineD3DBaseShaderImpl
*
This
=
(
IWineD3DBaseShaderImpl
*
)
iface
;
IWineD3DBaseShaderImpl
*
This
=
(
IWineD3DBaseShaderImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
/* To access shader backend callbacks */
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
/* To access shader backend callbacks */
const
SHADER_HANDLER
*
handler_table
=
device
->
shader_backend
->
shader_instruction_handler_table
;
const
SHADER_HANDLER
*
handler_table
=
device
->
shader_backend
->
shader_instruction_handler_table
;
...
@@ -1096,7 +1093,7 @@ static void shader_none_select_depth_blt(IWineD3DDevice *iface, enum tex_types t
...
@@ -1096,7 +1093,7 @@ static void shader_none_select_depth_blt(IWineD3DDevice *iface, enum tex_types t
static
void
shader_none_deselect_depth_blt
(
IWineD3DDevice
*
iface
)
{}
static
void
shader_none_deselect_depth_blt
(
IWineD3DDevice
*
iface
)
{}
static
void
shader_none_load_constants
(
IWineD3DDevice
*
iface
,
char
usePS
,
char
useVS
)
{}
static
void
shader_none_load_constants
(
IWineD3DDevice
*
iface
,
char
usePS
,
char
useVS
)
{}
static
void
shader_none_cleanup
(
IWineD3DDevice
*
iface
)
{}
static
void
shader_none_cleanup
(
IWineD3DDevice
*
iface
)
{}
static
void
shader_none_color_correction
(
SHADER_OPCODE_ARG
*
arg
)
{}
static
void
shader_none_color_correction
(
const
SHADER_OPCODE_ARG
*
arg
)
{}
static
void
shader_none_destroy
(
IWineD3DBaseShader
*
iface
)
{}
static
void
shader_none_destroy
(
IWineD3DBaseShader
*
iface
)
{}
static
HRESULT
shader_none_alloc
(
IWineD3DDevice
*
iface
)
{
return
WINED3D_OK
;}
static
HRESULT
shader_none_alloc
(
IWineD3DDevice
*
iface
)
{
return
WINED3D_OK
;}
static
void
shader_none_free
(
IWineD3DDevice
*
iface
)
{}
static
void
shader_none_free
(
IWineD3DDevice
*
iface
)
{}
...
@@ -1110,7 +1107,8 @@ static void shader_none_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUF
...
@@ -1110,7 +1107,8 @@ static void shader_none_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUF
}
}
#define GLINFO_LOCATION (*gl_info)
#define GLINFO_LOCATION (*gl_info)
static
void
shader_none_get_caps
(
WINED3DDEVTYPE
devtype
,
WineD3D_GL_Info
*
gl_info
,
struct
shader_caps
*
pCaps
)
{
static
void
shader_none_get_caps
(
WINED3DDEVTYPE
devtype
,
const
WineD3D_GL_Info
*
gl_info
,
struct
shader_caps
*
pCaps
)
{
/* Set the shader caps to 0 for the none shader backend */
/* Set the shader caps to 0 for the none shader backend */
pCaps
->
VertexShaderVersion
=
0
;
pCaps
->
VertexShaderVersion
=
0
;
pCaps
->
PixelShaderVersion
=
0
;
pCaps
->
PixelShaderVersion
=
0
;
...
...
dlls/wined3d/glsl_shader.c
View file @
d8f6e635
...
@@ -1186,7 +1186,8 @@ static void shader_glsl_get_sample_function(DWORD sampler_type, BOOL projected,
...
@@ -1186,7 +1186,8 @@ static void shader_glsl_get_sample_function(DWORD sampler_type, BOOL projected,
}
}
}
}
static
void
shader_glsl_color_correction
(
SHADER_OPCODE_ARG
*
arg
)
{
static
void
shader_glsl_color_correction
(
const
SHADER_OPCODE_ARG
*
arg
)
{
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
arg
->
shader
;
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
arg
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
;
WineD3D_GL_Info
*
gl_info
=
&
deviceImpl
->
adapter
->
gl_info
;
WineD3D_GL_Info
*
gl_info
=
&
deviceImpl
->
adapter
->
gl_info
;
...
@@ -3805,7 +3806,8 @@ static void shader_glsl_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUF
...
@@ -3805,7 +3806,8 @@ static void shader_glsl_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUF
This
->
prgId
=
shader_obj
;
This
->
prgId
=
shader_obj
;
}
}
static
void
shader_glsl_get_caps
(
WINED3DDEVTYPE
devtype
,
WineD3D_GL_Info
*
gl_info
,
struct
shader_caps
*
pCaps
)
{
static
void
shader_glsl_get_caps
(
WINED3DDEVTYPE
devtype
,
const
WineD3D_GL_Info
*
gl_info
,
struct
shader_caps
*
pCaps
)
{
/* Nvidia Geforce6/7 or Ati R4xx/R5xx cards with GLSL support, support VS 3.0 but older Nvidia/Ati
/* Nvidia Geforce6/7 or Ati R4xx/R5xx cards with GLSL support, support VS 3.0 but older Nvidia/Ati
* models with GLSL support only support 2.0. In case of nvidia we can detect VS 2.0 support using
* models with GLSL support only support 2.0. In case of nvidia we can detect VS 2.0 support using
* vs_nv_version which is based on NV_vertex_program.
* vs_nv_version which is based on NV_vertex_program.
...
...
dlls/wined3d/nvidia_texture_shader.c
View file @
d8f6e635
...
@@ -610,7 +610,8 @@ static void nvts_enable(IWineD3DDevice *iface, BOOL enable) {
...
@@ -610,7 +610,8 @@ static void nvts_enable(IWineD3DDevice *iface, BOOL enable) {
}
}
}
}
static
void
nvrc_fragment_get_caps
(
WINED3DDEVTYPE
devtype
,
WineD3D_GL_Info
*
gl_info
,
struct
fragment_caps
*
pCaps
)
{
static
void
nvrc_fragment_get_caps
(
WINED3DDEVTYPE
devtype
,
const
WineD3D_GL_Info
*
gl_info
,
struct
fragment_caps
*
pCaps
)
{
pCaps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_ADD
|
pCaps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_ADD
|
WINED3DTEXOPCAPS_ADDSIGNED
|
WINED3DTEXOPCAPS_ADDSIGNED
|
WINED3DTEXOPCAPS_ADDSIGNED2X
|
WINED3DTEXOPCAPS_ADDSIGNED2X
|
...
...
dlls/wined3d/state.c
View file @
d8f6e635
...
@@ -5437,7 +5437,8 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = {
...
@@ -5437,7 +5437,8 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = {
#define GLINFO_LOCATION (*gl_info)
#define GLINFO_LOCATION (*gl_info)
static
void
ffp_enable
(
IWineD3DDevice
*
iface
,
BOOL
enable
)
{
}
static
void
ffp_enable
(
IWineD3DDevice
*
iface
,
BOOL
enable
)
{
}
static
void
ffp_fragment_get_caps
(
WINED3DDEVTYPE
devtype
,
WineD3D_GL_Info
*
gl_info
,
struct
fragment_caps
*
pCaps
)
{
static
void
ffp_fragment_get_caps
(
WINED3DDEVTYPE
devtype
,
const
WineD3D_GL_Info
*
gl_info
,
struct
fragment_caps
*
pCaps
)
{
pCaps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_ADD
|
pCaps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_ADD
|
WINED3DTEXOPCAPS_ADDSIGNED
|
WINED3DTEXOPCAPS_ADDSIGNED
|
WINED3DTEXOPCAPS_ADDSIGNED2X
|
WINED3DTEXOPCAPS_ADDSIGNED2X
|
...
...
dlls/wined3d/wined3d_private.h
View file @
d8f6e635
...
@@ -345,14 +345,14 @@ typedef struct {
...
@@ -345,14 +345,14 @@ typedef struct {
void
(
*
shader_deselect_depth_blt
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_deselect_depth_blt
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_load_constants
)(
IWineD3DDevice
*
iface
,
char
usePS
,
char
useVS
);
void
(
*
shader_load_constants
)(
IWineD3DDevice
*
iface
,
char
usePS
,
char
useVS
);
void
(
*
shader_cleanup
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_cleanup
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_color_correction
)(
struct
SHADER_OPCODE_ARG
*
arg
);
void
(
*
shader_color_correction
)(
const
struct
SHADER_OPCODE_ARG
*
arg
);
void
(
*
shader_destroy
)(
IWineD3DBaseShader
*
iface
);
void
(
*
shader_destroy
)(
IWineD3DBaseShader
*
iface
);
HRESULT
(
*
shader_alloc_private
)(
IWineD3DDevice
*
iface
);
HRESULT
(
*
shader_alloc_private
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_free_private
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_free_private
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
shader_dirtifyable_constants
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
shader_dirtifyable_constants
)(
IWineD3DDevice
*
iface
);
GLuint
(
*
shader_generate_pshader
)(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
);
GLuint
(
*
shader_generate_pshader
)(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
);
void
(
*
shader_generate_vshader
)(
IWineD3DVertexShader
*
iface
,
SHADER_BUFFER
*
buffer
);
void
(
*
shader_generate_vshader
)(
IWineD3DVertexShader
*
iface
,
SHADER_BUFFER
*
buffer
);
void
(
*
shader_get_caps
)(
WINED3DDEVTYPE
devtype
,
WineD3D_GL_Info
*
gl_info
,
struct
shader_caps
*
caps
);
void
(
*
shader_get_caps
)(
WINED3DDEVTYPE
devtype
,
const
WineD3D_GL_Info
*
gl_info
,
struct
shader_caps
*
caps
);
BOOL
(
*
shader_conv_supported
)(
WINED3DFORMAT
conv
);
BOOL
(
*
shader_conv_supported
)(
WINED3DFORMAT
conv
);
}
shader_backend_t
;
}
shader_backend_t
;
...
@@ -642,7 +642,7 @@ struct fragment_caps {
...
@@ -642,7 +642,7 @@ struct fragment_caps {
struct
fragment_pipeline
{
struct
fragment_pipeline
{
void
(
*
enable_extension
)(
IWineD3DDevice
*
iface
,
BOOL
enable
);
void
(
*
enable_extension
)(
IWineD3DDevice
*
iface
,
BOOL
enable
);
void
(
*
get_caps
)(
WINED3DDEVTYPE
devtype
,
WineD3D_GL_Info
*
gl_info
,
struct
fragment_caps
*
caps
);
void
(
*
get_caps
)(
WINED3DDEVTYPE
devtype
,
const
WineD3D_GL_Info
*
gl_info
,
struct
fragment_caps
*
caps
);
HRESULT
(
*
alloc_private
)(
IWineD3DDevice
*
iface
);
HRESULT
(
*
alloc_private
)(
IWineD3DDevice
*
iface
);
void
(
*
free_private
)(
IWineD3DDevice
*
iface
);
void
(
*
free_private
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
conv_supported
)(
WINED3DFORMAT
conv
);
BOOL
(
*
conv_supported
)(
WINED3DFORMAT
conv
);
...
@@ -2066,7 +2066,7 @@ typedef struct SHADER_OPCODE {
...
@@ -2066,7 +2066,7 @@ typedef struct SHADER_OPCODE {
typedef
struct
SHADER_OPCODE_ARG
{
typedef
struct
SHADER_OPCODE_ARG
{
IWineD3DBaseShader
*
shader
;
IWineD3DBaseShader
*
shader
;
shader_reg_maps
*
reg_maps
;
const
shader_reg_maps
*
reg_maps
;
CONST
SHADER_OPCODE
*
opcode
;
CONST
SHADER_OPCODE
*
opcode
;
DWORD
opcode_token
;
DWORD
opcode_token
;
DWORD
dst
;
DWORD
dst
;
...
@@ -2194,11 +2194,8 @@ extern HRESULT shader_get_registers_used(
...
@@ -2194,11 +2194,8 @@ extern HRESULT shader_get_registers_used(
CONST
DWORD
*
pToken
,
CONST
DWORD
*
pToken
,
IWineD3DStateBlockImpl
*
stateBlock
);
IWineD3DStateBlockImpl
*
stateBlock
);
extern
void
shader_generate_main
(
extern
void
shader_generate_main
(
IWineD3DBaseShader
*
iface
,
SHADER_BUFFER
*
buffer
,
IWineD3DBaseShader
*
iface
,
const
shader_reg_maps
*
reg_maps
,
const
DWORD
*
pFunction
);
SHADER_BUFFER
*
buffer
,
shader_reg_maps
*
reg_maps
,
CONST
DWORD
*
pFunction
);
extern
void
shader_dump_ins_modifiers
(
extern
void
shader_dump_ins_modifiers
(
const
DWORD
output
);
const
DWORD
output
);
...
...
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