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
8b28ca72
Commit
8b28ca72
authored
Feb 14, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use GL_EXT_gpu_program_parameters if available.
parent
aeb0e43e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletion
+30
-1
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+17
-0
directx.c
dlls/wined3d/directx.c
+1
-0
wined3d_gl.h
include/wine/wined3d_gl.h
+12
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
8b28ca72
...
...
@@ -90,6 +90,22 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, Win
GL_EXTCALL
(
glProgramEnvParameter4fvARB
(
target_type
,
i
,
lcl_const
));
}
}
else
{
if
(
GL_SUPPORT
(
EXT_GPU_PROGRAM_PARAMETERS
))
{
/* TODO: Benchmark if we're better of with finding the dirty constants ourselves,
* or just reloading *all* constants at once
*
GL_EXTCALL(glProgramEnvParameters4fvEXT(target_type, 0, max_constants, constants));
*/
for
(
i
=
0
;
i
<
max_constants
;
i
++
)
{
if
(
!
dirty_consts
[
i
])
continue
;
/* Find the next block of dirty constants */
j
=
i
;
for
(
i
++
;
(
i
<
max_constants
)
&&
dirty_consts
[
i
];
i
++
);
GL_EXTCALL
(
glProgramEnvParameters4fvEXT
(
target_type
,
j
,
i
-
j
,
constants
+
(
j
*
4
)));
}
}
else
{
for
(
i
=
0
;
i
<
max_constants
;
i
++
)
{
if
(
dirty_consts
[
i
])
{
dirty_consts
[
i
]
=
0
;
...
...
@@ -97,6 +113,7 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, Win
}
}
}
}
checkGLcall
(
"glProgramEnvParameter4fvARB()"
);
/* Load immediate constants */
...
...
dlls/wined3d/directx.c
View file @
8b28ca72
...
...
@@ -107,6 +107,7 @@ static const struct {
{
"GL_EXT_texture_lod_bias"
,
EXT_TEXTURE_LOD_BIAS
,
0
},
{
"GL_EXT_vertex_shader"
,
EXT_VERTEX_SHADER
,
0
},
{
"GL_EXT_vertex_weighting"
,
EXT_VERTEX_WEIGHTING
,
0
},
{
"GL_EXT_gpu_program_parameters"
,
EXT_GPU_PROGRAM_PARAMETERS
,
0
},
/* NV */
{
"GL_NV_half_float"
,
NV_HALF_FLOAT
,
0
},
...
...
include/wine/wined3d_gl.h
View file @
8b28ca72
...
...
@@ -2906,6 +2906,13 @@ typedef void (WINE_GLAPI * PGLFNFINISHRENDERAPPLEPROC) (void);
#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F
#endif
/* GL_EXT_gpu_program_parameters */
#ifndef GL_EXT_gpu_program_parameters
#define GL_EXT_gpu_program_parameters
typedef
void
(
WINE_GLAPI
*
PGLFNPROGRAMENVPARAMETERS4FVEXTPROC
)
(
GLenum
target
,
GLuint
index
,
GLsizei
count
,
const
float
*
params
);
typedef
void
(
WINE_GLAPI
*
PGLFNPROGRAMLOCALPARAMETERS4FVEXTPROC
)
(
GLenum
target
,
GLuint
index
,
GLsizei
count
,
const
float
*
params
);
#endif
/* GL_VERSION_2_0 */
#ifndef GL_VERSION_2_0
#define GL_VERSION_2_0 1
...
...
@@ -3240,6 +3247,7 @@ typedef enum _GL_SupportedExt {
EXT_TEXTURE_ENV_DOT3
,
EXT_TEXTURE_SRGB
,
EXT_VERTEX_WEIGHTING
,
EXT_GPU_PROGRAM_PARAMETERS
,
/* NVIDIA */
NV_HALF_FLOAT
,
NV_FOG_DISTANCE
,
...
...
@@ -3559,7 +3567,10 @@ typedef enum _GL_SupportedExt {
USE_GL_FUNC(PGLXFNWAITVIDEOSYNCSGIPROC, glXWaitVideoSyncSGI, SGI_VIDEO_SYNC, NULL );\
/* GL_APPLE_flush_render */
\
USE_GL_FUNC(PGLFNFLUSHRENDERAPPLEPROC, glFlushRenderApple, APPLE_FLUSH_RENDER, NULL );\
USE_GL_FUNC(PGLFNFINISHRENDERAPPLEPROC, glFinishRenderApple, APPLE_FLUSH_RENDER, NULL );
USE_GL_FUNC(PGLFNFINISHRENDERAPPLEPROC, glFinishRenderApple, APPLE_FLUSH_RENDER, NULL );\
/* GL_EXT_gpu_program_parameters */
\
USE_GL_FUNC(PGLFNPROGRAMENVPARAMETERS4FVEXTPROC, glProgramEnvParameters4fvEXT, EXT_GPU_PROGRAM_PARAMETERS,NULL );\
USE_GL_FUNC(PGLFNPROGRAMLOCALPARAMETERS4FVEXTPROC, glProgramLocalParameters4fvEXT, EXT_GPU_PROGRAM_PARAMETERS,NULL );
/****************************************************
* OpenGL WGL defines and functions pointer
...
...
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