Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
122ed40c
Commit
122ed40c
authored
Oct 07, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use ARB constant limits in ARB.
parent
43564655
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+9
-9
No files found.
dlls/wined3d/arb_program_shader.c
View file @
122ed40c
...
...
@@ -84,10 +84,10 @@ static inline BOOL ffp_clip_emul(IWineD3DStateBlockImpl *stateblock)
return
stateblock
->
lowest_disabled_stage
<
7
;
}
/* Internally used shader constants. Applications can use constants 0 to GL_LIMITS(vs
hader
_constantsF) - 1,
/* Internally used shader constants. Applications can use constants 0 to GL_LIMITS(vs
_arb
_constantsF) - 1,
* so upload them above that
*/
#define ARB_SHADER_PRIVCONST_BASE (GL_LIMITS(vs
hader
_constantsF) - 1)
#define ARB_SHADER_PRIVCONST_BASE (GL_LIMITS(vs
_arb
_constantsF) - 1)
#define ARB_SHADER_PRIVCONST_POS ARB_SHADER_PRIVCONST_BASE + 0
/* ARB_program_shader private data */
...
...
@@ -634,11 +634,11 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s
* and don't know which are actually used.
*/
if
(
pshader
)
{
max_constantsF
=
GL_LIMITS
(
ps
hader
_constantsF
);
max_constantsF
=
GL_LIMITS
(
ps
_arb
_constantsF
);
}
else
{
if
(
This
->
baseShader
.
reg_maps
.
usesrelconstF
)
{
DWORD
highest_constf
=
0
,
clip_limit
;
max_constantsF
=
GL_LIMITS
(
vs
hader
_constantsF
)
-
reserved_vs_const
(
iface
,
gl_info
);
max_constantsF
=
GL_LIMITS
(
vs
_arb
_constantsF
)
-
reserved_vs_const
(
iface
,
gl_info
);
max_constantsF
-=
count_bits
(
This
->
baseShader
.
reg_maps
.
integer_constants
);
for
(
i
=
0
;
i
<
This
->
baseShader
.
limits
.
constant_float
;
i
++
)
...
...
@@ -668,7 +668,7 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s
{
if
(
ctx
->
target_version
>=
NV2
)
*
num_clipplanes
=
GL_LIMITS
(
clipplanes
);
else
*
num_clipplanes
=
min
(
GL_LIMITS
(
clipplanes
),
4
);
max_constantsF
=
GL_LIMITS
(
vs
hader
_constantsF
);
max_constantsF
=
GL_LIMITS
(
vs
_arb
_constantsF
);
}
}
...
...
@@ -4527,7 +4527,7 @@ static void shader_arb_get_caps(WINED3DDEVTYPE devtype, const struct wined3d_gl_
pCaps
->
VertexShaderVersion
=
WINED3DVS_VERSION
(
3
,
0
);
TRACE_
(
d3d_caps
)(
"Hardware vertex shader version 3.0 enabled (NV_VERTEX_PROGRAM3)
\n
"
);
}
else
if
(
GL_LIMITS
(
vs
hader
_constantsF
)
>=
256
)
else
if
(
GL_LIMITS
(
vs
_arb
_constantsF
)
>=
256
)
{
/* Shader Model 2.0 requires at least 256 vertex shader constants */
pCaps
->
VertexShaderVersion
=
WINED3DVS_VERSION
(
2
,
0
);
...
...
@@ -4538,7 +4538,7 @@ static void shader_arb_get_caps(WINED3DDEVTYPE devtype, const struct wined3d_gl_
pCaps
->
VertexShaderVersion
=
WINED3DVS_VERSION
(
1
,
1
);
TRACE_
(
d3d_caps
)(
"Hardware vertex shader version 1.1 enabled (ARB_PROGRAM)
\n
"
);
}
pCaps
->
MaxVertexShaderConst
=
GL_LIMITS
(
vs
hader
_constantsF
);
pCaps
->
MaxVertexShaderConst
=
GL_LIMITS
(
vs
_arb
_constantsF
);
}
if
(
GL_SUPPORT
(
ARB_FRAGMENT_PROGRAM
))
{
...
...
@@ -4547,7 +4547,7 @@ static void shader_arb_get_caps(WINED3DDEVTYPE devtype, const struct wined3d_gl_
pCaps
->
PixelShaderVersion
=
WINED3DPS_VERSION
(
3
,
0
);
TRACE_
(
d3d_caps
)(
"Hardware pixel shader version 3.0 enabled (NV_FRAGMENT_PROGRAM2)
\n
"
);
}
else
if
(
GL_LIMITS
(
ps
hader
_constantsF
)
>=
32
)
else
if
(
GL_LIMITS
(
ps
_arb
_constantsF
)
>=
32
)
{
/* Shader Model 2.0 requires at least 32 pixel shader constants */
pCaps
->
PixelShaderVersion
=
WINED3DPS_VERSION
(
2
,
0
);
...
...
@@ -4559,7 +4559,7 @@ static void shader_arb_get_caps(WINED3DDEVTYPE devtype, const struct wined3d_gl_
TRACE_
(
d3d_caps
)(
"Hardware pixel shader version 1.4 enabled (ARB_PROGRAM)
\n
"
);
}
pCaps
->
PixelShader1xMaxValue
=
8
.
0
f
;
pCaps
->
MaxPixelShaderConst
=
GL_LIMITS
(
ps
hader
_constantsF
);
pCaps
->
MaxPixelShaderConst
=
GL_LIMITS
(
ps
_arb
_constantsF
);
}
pCaps
->
VSClipping
=
use_nv_clip
(
gl_info
);
...
...
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