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
42a9262a
Commit
42a9262a
authored
Sep 27, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Sep 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Read GL info and load constants into the same device.
parent
d0032a1a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+4
-4
drawprim.c
dlls/wined3d/drawprim.c
+2
-2
glsl_shader.c
dlls/wined3d/glsl_shader.c
+6
-5
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
42a9262a
...
...
@@ -102,19 +102,19 @@ static void shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL_
* worry about the Integers or Booleans
*/
void
shader_arb_load_constants
(
IWineD3D
StateBlock
*
ifa
ce
,
IWineD3D
Device
*
devi
ce
,
char
usePixelShader
,
char
useVertexShader
)
{
IWineD3DStateBlockImpl
*
stateBlock
=
(
IWineD3DStateBlockImpl
*
)
iface
;
WineD3D_GL_Info
*
gl_info
=
&
((
IWineD3DImpl
*
)
stateBlock
->
wineD3DDevice
->
wineD3D
)
->
gl_info
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
device
;
IWineD3DStateBlockImpl
*
stateBlock
=
deviceImpl
->
stateBlock
;
WineD3D_GL_Info
*
gl_info
=
&
((
IWineD3DImpl
*
)
deviceImpl
->
wineD3D
)
->
gl_info
;
if
(
useVertexShader
)
{
IWineD3DBaseShaderImpl
*
vshader
=
(
IWineD3DBaseShaderImpl
*
)
stateBlock
->
vertexShader
;
IWineD3DVertexShaderImpl
*
vshader_impl
=
(
IWineD3DVertexShaderImpl
*
)
stateBlock
->
vertexShader
;
IWineD3DVertexDeclarationImpl
*
vertexDeclaration
=
(
IWineD3DVertexDeclarationImpl
*
)
vshader_impl
->
vertexDeclaration
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
vshader
->
baseShader
.
device
;
if
(
NULL
!=
vertexDeclaration
&&
NULL
!=
vertexDeclaration
->
constants
)
{
/* Load DirectX 8 float constants for vertex shader */
...
...
dlls/wined3d/drawprim.c
View file @
42a9262a
...
...
@@ -1852,9 +1852,9 @@ inline static void drawPrimitiveDrawStrided(
/* Load any global constants/uniforms that may have been set by the application */
if
(
wined3d_settings
.
vs_selected_mode
==
SHADER_GLSL
||
wined3d_settings
.
ps_selected_mode
==
SHADER_GLSL
)
shader_glsl_load_constants
(
(
IWineD3DStateBlock
*
)
This
->
stateBlock
,
usePixelShaderFunction
,
useVertexShaderFunction
);
shader_glsl_load_constants
(
iface
,
usePixelShaderFunction
,
useVertexShaderFunction
);
else
if
(
wined3d_settings
.
vs_selected_mode
==
SHADER_ARB
||
wined3d_settings
.
ps_selected_mode
==
SHADER_ARB
)
shader_arb_load_constants
(
(
IWineD3DStateBlock
*
)
This
->
stateBlock
,
usePixelShaderFunction
,
useVertexShaderFunction
);
shader_arb_load_constants
(
iface
,
usePixelShaderFunction
,
useVertexShaderFunction
);
/* Draw vertex-by-vertex */
if
(
useDrawStridedSlow
)
...
...
dlls/wined3d/glsl_shader.c
View file @
42a9262a
...
...
@@ -269,12 +269,14 @@ void shader_glsl_load_constantsB(
* Loads the app-supplied constants into the currently set GLSL program.
*/
void
shader_glsl_load_constants
(
IWineD3D
StateBlock
*
ifa
ce
,
IWineD3D
Device
*
devi
ce
,
char
usePixelShader
,
char
useVertexShader
)
{
IWineD3DStateBlockImpl
*
stateBlock
=
(
IWineD3DStateBlockImpl
*
)
iface
;
WineD3D_GL_Info
*
gl_info
=
&
((
IWineD3DImpl
*
)
stateBlock
->
wineD3DDevice
->
wineD3D
)
->
gl_info
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
device
;
IWineD3DStateBlockImpl
*
stateBlock
=
deviceImpl
->
stateBlock
;
WineD3D_GL_Info
*
gl_info
=
&
((
IWineD3DImpl
*
)
deviceImpl
->
wineD3D
)
->
gl_info
;
GLhandleARB
*
constant_locations
;
struct
list
*
constant_list
;
GLhandleARB
programId
;
...
...
@@ -288,7 +290,6 @@ void shader_glsl_load_constants(
if
(
useVertexShader
)
{
IWineD3DBaseShaderImpl
*
vshader
=
(
IWineD3DBaseShaderImpl
*
)
stateBlock
->
vertexShader
;
IWineD3DVertexShaderImpl
*
vshader_impl
=
(
IWineD3DVertexShaderImpl
*
)
vshader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
vshader
->
baseShader
.
device
;
GLint
pos
;
IWineD3DVertexDeclarationImpl
*
vertexDeclaration
=
...
...
@@ -332,7 +333,7 @@ void shader_glsl_load_constants(
constant_list
=
&
stateBlock
->
set_pconstantsF
;
/* Load pixel shader samplers */
shader_glsl_load_psamplers
(
gl_info
,
iface
);
shader_glsl_load_psamplers
(
gl_info
,
(
IWineD3DStateBlock
*
)
stateBlock
);
/* Load DirectX 9 float constants/uniforms for pixel shader */
shader_glsl_load_constantsF
(
pshader
,
gl_info
,
GL_LIMITS
(
pshader_constantsF
),
...
...
dlls/wined3d/wined3d_private.h
View file @
42a9262a
...
...
@@ -1412,6 +1412,7 @@ typedef struct SHADER_OPCODE {
}
SHADER_OPCODE
;
typedef
struct
SHADER_OPCODE_ARG
{
IWineD3DStateBlock
*
stateBlock
;
IWineD3DBaseShader
*
shader
;
shader_reg_maps
*
reg_maps
;
CONST
SHADER_OPCODE
*
opcode
;
...
...
@@ -1472,7 +1473,7 @@ extern HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object);
/* ARB_[vertex/fragment]_program helper functions */
extern
void
shader_arb_load_constants
(
IWineD3D
StateBlock
*
ifa
ce
,
IWineD3D
Device
*
devi
ce
,
char
usePixelShader
,
char
useVertexShader
);
...
...
@@ -1503,7 +1504,7 @@ extern void vshader_hw_mnxn(SHADER_OPCODE_ARG* arg);
extern
void
set_glsl_shader_program
(
IWineD3DDevice
*
iface
);
extern
void
shader_glsl_add_instruction_modifiers
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
shader_glsl_load_constants
(
IWineD3D
StateBlock
*
ifa
ce
,
IWineD3D
Device
*
devi
ce
,
char
usePixelShader
,
char
useVertexShader
);
...
...
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