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
a4400510
Commit
a4400510
authored
Mar 22, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a shader DLL init callback.
parent
18e16f4e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
0 deletions
+17
-0
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+4
-0
baseshader.c
dlls/wined3d/baseshader.c
+2
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+3
-0
wined3d_main.c
dlls/wined3d/wined3d_main.c
+4
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+4
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
a4400510
...
...
@@ -2058,6 +2058,9 @@ static void shader_arb_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info
TRACE_
(
d3d_caps
)(
"Hardware pixel shader version 1.4 enabled (ARB_PROGRAM)
\n
"
);
}
static
void
shader_arb_load_init
(
void
)
{
}
const
shader_backend_t
arb_program_shader_backend
=
{
&
shader_arb_select
,
&
shader_arb_select_depth_blt
,
...
...
@@ -2072,5 +2075,6 @@ const shader_backend_t arb_program_shader_backend = {
&
shader_arb_generate_pshader
,
&
shader_arb_generate_vshader
,
&
shader_arb_get_caps
,
&
shader_arb_load_init
,
FFPStateTable
};
dlls/wined3d/baseshader.c
View file @
a4400510
...
...
@@ -1104,6 +1104,7 @@ static void shader_none_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUFF
static
void
shader_none_generate_vshader
(
IWineD3DVertexShader
*
iface
,
SHADER_BUFFER
*
buffer
)
{
FIXME
(
"NONE shader backend asked to generate a vertex shader
\n
"
);
}
static
void
shader_none_load_init
(
void
)
{}
#define GLINFO_LOCATION (*gl_info)
static
void
shader_none_get_caps
(
WINED3DDEVTYPE
devtype
,
WineD3D_GL_Info
*
gl_info
,
struct
shader_caps
*
pCaps
)
{
...
...
@@ -1185,6 +1186,7 @@ const shader_backend_t none_shader_backend = {
&
shader_none_generate_pshader
,
&
shader_none_generate_vshader
,
&
shader_none_get_caps
,
&
shader_none_load_init
,
FFPStateTable
};
...
...
dlls/wined3d/glsl_shader.c
View file @
a4400510
...
...
@@ -3580,6 +3580,8 @@ static void shader_glsl_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_inf
TRACE_
(
d3d_caps
)(
"Hardware pixel shader version %d.%d enabled (GLSL)
\n
"
,
(
pCaps
->
PixelShaderVersion
>>
8
)
&
0xff
,
pCaps
->
PixelShaderVersion
&
0xff
);
}
static
void
shader_glsl_load_init
(
void
)
{}
const
shader_backend_t
glsl_shader_backend
=
{
&
shader_glsl_select
,
&
shader_glsl_select_depth_blt
,
...
...
@@ -3594,5 +3596,6 @@ const shader_backend_t glsl_shader_backend = {
&
shader_glsl_generate_pshader
,
&
shader_glsl_generate_vshader
,
&
shader_glsl_get_caps
,
&
shader_glsl_load_init
,
FFPStateTable
};
dlls/wined3d/wined3d_main.c
View file @
a4400510
...
...
@@ -93,6 +93,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
DWORD
len
;
WNDCLASSA
wc
;
glsl_shader_backend
.
shader_dll_load_init
();
arb_program_shader_backend
.
shader_dll_load_init
();
none_shader_backend
.
shader_dll_load_init
();
/* We need our own window class for a fake window which we use to retrieve GL capabilities */
/* We might need CS_OWNDC in the future if we notice strange things on Windows.
* Various articles/posts about OpenGL problems on Windows recommend this. */
...
...
dlls/wined3d/wined3d_private.h
View file @
a4400510
...
...
@@ -291,6 +291,7 @@ typedef struct {
void
(
*
shader_generate_pshader
)(
IWineD3DPixelShader
*
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_dll_load_init
)(
void
);
const
struct
StateEntry
*
StateTable
;
}
shader_backend_t
;
...
...
@@ -789,6 +790,9 @@ struct IWineD3DDeviceImpl
struct
list
shaders
;
/* a linked list to track shaders (pixel and vertex) */
unsigned
int
highest_dirty_ps_const
,
highest_dirty_vs_const
;
/* TODO: Move this into the shader model private data */
struct
list
fragment_shaders
;
/* A linked list to track fragment pipeline replacement shaders */
/* Render Target Support */
IWineD3DSurface
**
render_targets
;
IWineD3DSurface
*
auto_depth_stencil_buffer
;
...
...
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