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
2576bf3d
Commit
2576bf3d
authored
May 06, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
May 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix some more indentation.
parent
46b4c15a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
141 deletions
+139
-141
pixelshader.c
dlls/wined3d/pixelshader.c
+78
-78
vertexshader.c
dlls/wined3d/vertexshader.c
+61
-63
No files found.
dlls/wined3d/pixelshader.c
View file @
2576bf3d
...
...
@@ -120,84 +120,84 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_GetFunction(IWineD3DPixelShader*
return
WINED3D_OK
;
}
static
void
pshader_set_limits
(
IWineD3DPixelShaderImpl
*
This
)
{
This
->
baseShader
.
limits
.
attribute
s
=
0
;
This
->
baseShader
.
limits
.
address
=
0
;
This
->
baseShader
.
limits
.
packed_output
=
0
;
switch
(
This
->
baseShader
.
reg_maps
.
shader_version
)
{
case
WINED3DPS_VERSION
(
1
,
0
):
case
WINED3DPS_VERSION
(
1
,
1
):
case
WINED3DPS_VERSION
(
1
,
2
):
case
WINED3DPS_VERSION
(
1
,
3
):
This
->
baseShader
.
limits
.
temporary
=
2
;
This
->
baseShader
.
limits
.
constant_float
=
8
;
This
->
baseShader
.
limits
.
constant_int
=
0
;
This
->
baseShader
.
limits
.
constant_bool
=
0
;
This
->
baseShader
.
limits
.
texcoord
=
4
;
This
->
baseShader
.
limits
.
sampler
=
4
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
This
->
baseShader
.
limits
.
label
=
0
;
break
;
case
WINED3DPS_VERSION
(
1
,
4
):
This
->
baseShader
.
limits
.
temporary
=
6
;
This
->
baseShader
.
limits
.
constant_float
=
8
;
This
->
baseShader
.
limits
.
constant_int
=
0
;
This
->
baseShader
.
limits
.
constant_bool
=
0
;
This
->
baseShader
.
limits
.
texcoord
=
6
;
This
->
baseShader
.
limits
.
sampler
=
6
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
This
->
baseShader
.
limits
.
label
=
0
;
break
;
/* FIXME: temporaries must match D3DPSHADERCAPS2_0.NumTemps */
case
WINED3DPS_VERSION
(
2
,
0
):
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_float
=
32
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
texcoord
=
8
;
This
->
baseShader
.
limits
.
sampler
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
break
;
case
WINED3DPS_VERSION
(
2
,
1
):
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_float
=
32
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
texcoord
=
8
;
This
->
baseShader
.
limits
.
sampler
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
This
->
baseShader
.
limits
.
label
=
16
;
break
;
case
WINED3DPS_VERSION
(
3
,
0
):
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_float
=
224
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
texcoord
=
0
;
This
->
baseShader
.
limits
.
sampler
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
12
;
This
->
baseShader
.
limits
.
label
=
16
;
/* FIXME: 2048 */
break
;
default
:
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_float
=
32
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
texcoord
=
8
;
This
->
baseShader
.
limits
.
sampler
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
This
->
baseShader
.
limits
.
label
=
0
;
FIXME
(
"Unrecognized pixel shader version %#x
\n
"
,
This
->
baseShader
.
reg_maps
.
shader_version
);
}
static
void
pshader_set_limits
(
IWineD3DPixelShaderImpl
*
This
)
{
This
->
baseShader
.
limits
.
attributes
=
0
;
This
->
baseShader
.
limits
.
addres
s
=
0
;
This
->
baseShader
.
limits
.
packed_output
=
0
;
switch
(
This
->
baseShader
.
reg_maps
.
shader_version
)
{
case
WINED3DPS_VERSION
(
1
,
0
):
case
WINED3DPS_VERSION
(
1
,
1
):
case
WINED3DPS_VERSION
(
1
,
2
):
case
WINED3DPS_VERSION
(
1
,
3
):
This
->
baseShader
.
limits
.
temporary
=
2
;
This
->
baseShader
.
limits
.
constant_float
=
8
;
This
->
baseShader
.
limits
.
constant_int
=
0
;
This
->
baseShader
.
limits
.
constant_bool
=
0
;
This
->
baseShader
.
limits
.
texcoord
=
4
;
This
->
baseShader
.
limits
.
sampler
=
4
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
This
->
baseShader
.
limits
.
label
=
0
;
break
;
case
WINED3DPS_VERSION
(
1
,
4
):
This
->
baseShader
.
limits
.
temporary
=
6
;
This
->
baseShader
.
limits
.
constant_float
=
8
;
This
->
baseShader
.
limits
.
constant_int
=
0
;
This
->
baseShader
.
limits
.
constant_bool
=
0
;
This
->
baseShader
.
limits
.
texcoord
=
6
;
This
->
baseShader
.
limits
.
sampler
=
6
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
This
->
baseShader
.
limits
.
label
=
0
;
break
;
/* FIXME: temporaries must match D3DPSHADERCAPS2_0.NumTemps */
case
WINED3DPS_VERSION
(
2
,
0
):
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_float
=
32
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
texcoord
=
8
;
This
->
baseShader
.
limits
.
sampler
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
break
;
case
WINED3DPS_VERSION
(
2
,
1
):
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_float
=
32
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
texcoord
=
8
;
This
->
baseShader
.
limits
.
sampler
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
This
->
baseShader
.
limits
.
label
=
16
;
break
;
case
WINED3DPS_VERSION
(
3
,
0
):
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_float
=
224
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
texcoord
=
0
;
This
->
baseShader
.
limits
.
sampler
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
12
;
This
->
baseShader
.
limits
.
label
=
16
;
/* FIXME: 2048 */
break
;
default
:
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_float
=
32
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
texcoord
=
8
;
This
->
baseShader
.
limits
.
sampler
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
This
->
baseShader
.
limits
.
label
=
0
;
FIXME
(
"Unrecognized pixel shader version %#x
\n
"
,
This
->
baseShader
.
reg_maps
.
shader_version
);
}
}
static
HRESULT
WINAPI
IWineD3DPixelShaderImpl_SetFunction
(
IWineD3DPixelShader
*
iface
,
CONST
DWORD
*
pFunction
)
{
...
...
dlls/wined3d/vertexshader.c
View file @
2576bf3d
...
...
@@ -34,69 +34,67 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
#define GLINFO_LOCATION ((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info
static
void
vshader_set_limits
(
IWineD3DVertexShaderImpl
*
This
)
{
This
->
baseShader
.
limits
.
texcoord
=
0
;
This
->
baseShader
.
limits
.
attributes
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
switch
(
This
->
baseShader
.
reg_maps
.
shader_version
)
{
case
WINED3DVS_VERSION
(
1
,
0
):
case
WINED3DVS_VERSION
(
1
,
1
):
This
->
baseShader
.
limits
.
temporary
=
12
;
This
->
baseShader
.
limits
.
constant_bool
=
0
;
This
->
baseShader
.
limits
.
constant_int
=
0
;
This
->
baseShader
.
limits
.
address
=
1
;
This
->
baseShader
.
limits
.
packed_output
=
0
;
This
->
baseShader
.
limits
.
sampler
=
0
;
This
->
baseShader
.
limits
.
label
=
0
;
/* TODO: vs_1_1 has a minimum of 96 constants. What happens if a vs_1_1 shader is used
* on a vs_3_0 capable card that has 256 constants?
*/
This
->
baseShader
.
limits
.
constant_float
=
min
(
256
,
GL_LIMITS
(
vshader_constantsF
));
break
;
case
WINED3DVS_VERSION
(
2
,
0
):
case
WINED3DVS_VERSION
(
2
,
1
):
This
->
baseShader
.
limits
.
temporary
=
12
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
address
=
1
;
This
->
baseShader
.
limits
.
packed_output
=
0
;
This
->
baseShader
.
limits
.
sampler
=
0
;
This
->
baseShader
.
limits
.
label
=
16
;
This
->
baseShader
.
limits
.
constant_float
=
min
(
256
,
GL_LIMITS
(
vshader_constantsF
));
break
;
case
WINED3DVS_VERSION
(
3
,
0
):
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_bool
=
32
;
This
->
baseShader
.
limits
.
constant_int
=
32
;
This
->
baseShader
.
limits
.
address
=
1
;
This
->
baseShader
.
limits
.
packed_output
=
12
;
This
->
baseShader
.
limits
.
sampler
=
4
;
This
->
baseShader
.
limits
.
label
=
16
;
/* FIXME: 2048 */
/* DX10 cards on Windows advertise a d3d9 constant limit of 256 even though they are capable
* of supporting much more(GL drivers advertise 1024). d3d9.dll and d3d8.dll clamp the
* wined3d-advertised maximum. Clamp the constant limit for <= 3.0 shaders to 256.s
* use constant buffers
*/
This
->
baseShader
.
limits
.
constant_float
=
min
(
256
,
GL_LIMITS
(
vshader_constantsF
));
break
;
default:
This
->
baseShader
.
limits
.
temporary
=
12
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
address
=
1
;
This
->
baseShader
.
limits
.
packed_output
=
0
;
This
->
baseShader
.
limits
.
sampler
=
0
;
This
->
baseShader
.
limits
.
label
=
16
;
This
->
baseShader
.
limits
.
constant_float
=
min
(
256
,
GL_LIMITS
(
vshader_constantsF
));
FIXME
(
"Unrecognized vertex shader version %#x
\n
"
,
This
->
baseShader
.
reg_maps
.
shader_version
);
}
static
void
vshader_set_limits
(
IWineD3DVertexShaderImpl
*
This
)
{
This
->
baseShader
.
limits
.
texcoord
=
0
;
This
->
baseShader
.
limits
.
attributes
=
16
;
This
->
baseShader
.
limits
.
packed_input
=
0
;
switch
(
This
->
baseShader
.
reg_maps
.
shader_version
)
{
case
WINED3DVS_VERSION
(
1
,
0
):
case
WINED3DVS_VERSION
(
1
,
1
):
This
->
baseShader
.
limits
.
temporary
=
12
;
This
->
baseShader
.
limits
.
constant_bool
=
0
;
This
->
baseShader
.
limits
.
constant_int
=
0
;
This
->
baseShader
.
limits
.
address
=
1
;
This
->
baseShader
.
limits
.
packed_output
=
0
;
This
->
baseShader
.
limits
.
sampler
=
0
;
This
->
baseShader
.
limits
.
label
=
0
;
/* TODO: vs_1_1 has a minimum of 96 constants. What happens if a vs_1_1 shader is used
* on a vs_3_0 capable card that has 256 constants? */
This
->
baseShader
.
limits
.
constant_float
=
min
(
256
,
GL_LIMITS
(
vshader_constantsF
));
break
;
case
WINED3DVS_VERSION
(
2
,
0
):
case
WINED3DVS_VERSION
(
2
,
1
):
This
->
baseShader
.
limits
.
temporary
=
12
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
address
=
1
;
This
->
baseShader
.
limits
.
packed_output
=
0
;
This
->
baseShader
.
limits
.
sampler
=
0
;
This
->
baseShader
.
limits
.
label
=
16
;
This
->
baseShader
.
limits
.
constant_float
=
min
(
256
,
GL_LIMITS
(
vshader_constantsF
));
break
;
case
WINED3DVS_VERSION
(
3
,
0
):
This
->
baseShader
.
limits
.
temporary
=
32
;
This
->
baseShader
.
limits
.
constant_bool
=
32
;
This
->
baseShader
.
limits
.
constant_int
=
32
;
This
->
baseShader
.
limits
.
address
=
1
;
This
->
baseShader
.
limits
.
packed_output
=
12
;
This
->
baseShader
.
limits
.
sampler
=
4
;
This
->
baseShader
.
limits
.
label
=
16
;
/* FIXME: 2048 */
/* DX10 cards on Windows advertise a d3d9 constant limit of 256 even though they are capable
* of supporting much more(GL drivers advertise 1024). d3d9.dll and d3d8.dll clamp the
* wined3d-advertised maximum. Clamp the constant limit for <= 3.0 shaders to 256.s
* use constant buffers */
This
->
baseShader
.
limits
.
constant_float
=
min
(
256
,
GL_LIMITS
(
vshader_constantsF
));
break
;
default:
This
->
baseShader
.
limits
.
temporary
=
12
;
This
->
baseShader
.
limits
.
constant_bool
=
16
;
This
->
baseShader
.
limits
.
constant_int
=
16
;
This
->
baseShader
.
limits
.
address
=
1
;
This
->
baseShader
.
limits
.
packed_output
=
0
;
This
->
baseShader
.
limits
.
sampler
=
0
;
This
->
baseShader
.
limits
.
label
=
16
;
This
->
baseShader
.
limits
.
constant_float
=
min
(
256
,
GL_LIMITS
(
vshader_constantsF
));
FIXME
(
"Unrecognized vertex shader version %#x
\n
"
,
This
->
baseShader
.
reg_maps
.
shader_version
);
}
}
/* This is an internal function,
...
...
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