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
3febe738
Commit
3febe738
authored
Oct 26, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle ps 3.0 varyings in a different way.
parent
654571f2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
10 deletions
+42
-10
glsl_shader.c
dlls/wined3d/glsl_shader.c
+0
-0
pixelshader.c
dlls/wined3d/pixelshader.c
+27
-2
vertexshader.c
dlls/wined3d/vertexshader.c
+5
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+10
-6
No files found.
dlls/wined3d/glsl_shader.c
View file @
3febe738
This diff is collapsed.
Click to expand it.
dlls/wined3d/pixelshader.c
View file @
3febe738
...
...
@@ -361,8 +361,19 @@ static inline VOID IWineD3DPixelShaderImpl_GenerateShader(
shader_generate_glsl_declarations
(
(
IWineD3DBaseShader
*
)
This
,
reg_maps
,
&
buffer
,
&
GLINFO_LOCATION
);
/* Pack 3.0 inputs */
if
(
This
->
baseShader
.
hex_version
>=
WINED3DPS_VERSION
(
3
,
0
))
pshader_glsl_input_pack
(
&
buffer
,
This
->
semantics_in
);
if
(
This
->
baseShader
.
hex_version
>=
WINED3DPS_VERSION
(
3
,
0
)
&&
!
use_vs
((
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
))
{
if
(((
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
)
->
strided_streams
.
u
.
s
.
position_transformed
)
{
This
->
vertexprocessing
=
pretransformed
;
}
else
if
(
!
use_vs
((
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
))
{
This
->
vertexprocessing
=
fixedfunction
;
}
else
{
This
->
vertexprocessing
=
vertexshader
;
}
pshader_glsl_input_pack
(
&
buffer
,
This
->
semantics_in
,
iface
);
}
/* Base Shader Body */
shader_generate_main
(
(
IWineD3DBaseShader
*
)
This
,
&
buffer
,
reg_maps
,
pFunction
);
...
...
@@ -605,6 +616,20 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_CompileShader(IWineD3DPixelShader
goto
recompile
;
}
}
if
(
This
->
baseShader
.
hex_version
>=
WINED3DPS_VERSION
(
3
,
0
))
{
if
(((
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
)
->
strided_streams
.
u
.
s
.
position_transformed
&&
This
->
vertexprocessing
!=
pretransformed
)
{
WARN
(
"Recompiling shader because pretransformed vertices are provided, which wasn't the case before
\n
"
);
goto
recompile
;
}
else
if
(
!
use_vs
((
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
)
&&
This
->
vertexprocessing
!=
fixedfunction
)
{
WARN
(
"Recompiling shader because fixed function vp is in use, which wasn't the case before
\n
"
);
goto
recompile
;
}
else
if
(
This
->
vertexprocessing
!=
vertexshader
)
{
WARN
(
"Recompiling shader because vertex shaders are in use, which wasn't the case before
\n
"
);
goto
recompile
;
}
}
return
WINED3D_OK
;
...
...
dlls/wined3d/vertexshader.c
View file @
3febe738
...
...
@@ -324,8 +324,11 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
shader_generate_main
(
(
IWineD3DBaseShader
*
)
This
,
&
buffer
,
reg_maps
,
pFunction
);
/* Unpack 3.0 outputs */
if
(
This
->
baseShader
.
hex_version
>=
WINED3DVS_VERSION
(
3
,
0
))
vshader_glsl_output_unpack
(
&
buffer
,
This
->
semantics_out
);
if
(
This
->
baseShader
.
hex_version
>=
WINED3DVS_VERSION
(
3
,
0
))
{
shader_addline
(
&
buffer
,
"order_ps_input(OUT);
\n
"
);
}
else
{
shader_addline
(
&
buffer
,
"order_ps_input();
\n
"
);
}
/* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
if
(
!
reg_maps
->
fog
)
...
...
dlls/wined3d/wined3d_private.h
View file @
3febe738
...
...
@@ -1871,12 +1871,8 @@ extern void pshader_glsl_texreg2rgb(SHADER_OPCODE_ARG* arg);
extern
void
pshader_glsl_dp2add
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_glsl_input_pack
(
SHADER_BUFFER
*
buffer
,
semantic
*
semantics_out
);
/** GLSL Vertex Shader Prototypes */
extern
void
vshader_glsl_output_unpack
(
SHADER_BUFFER
*
buffer
,
semantic
*
semantics_out
);
semantic
*
semantics_out
,
IWineD3DPixelShader
*
iface
);
/*****************************************************************************
* IDirect3DBaseShader implementation structure
...
...
@@ -2066,6 +2062,13 @@ extern const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl;
/*****************************************************************************
* IDirect3DPixelShader implementation structure
*/
enum
vertexprocessing_mode
{
fixedfunction
,
vertexshader
,
pretransformed
};
typedef
struct
IWineD3DPixelShaderImpl
{
/* IUnknown parts */
const
IWineD3DPixelShaderVtbl
*
lpVtbl
;
...
...
@@ -2094,6 +2097,7 @@ typedef struct IWineD3DPixelShaderImpl {
char
vpos_uniform
;
BOOL
render_offscreen
;
UINT
height
;
enum
vertexprocessing_mode
vertexprocessing
;
#if 0 /* needs reworking */
PSHADERINPUTDATA input;
...
...
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