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
b35e469d
Commit
b35e469d
authored
May 14, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
May 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Document functions that depend on the caller to do GL locking.
parent
3022a4a7
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
70 additions
and
0 deletions
+70
-0
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+11
-0
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+2
-0
basetexture.c
dlls/wined3d/basetexture.c
+2
-0
context.c
dlls/wined3d/context.c
+13
-0
directx.c
dlls/wined3d/directx.c
+1
-0
drawprim.c
dlls/wined3d/drawprim.c
+5
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+22
-0
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+3
-0
pixelshader.c
dlls/wined3d/pixelshader.c
+2
-0
state.c
dlls/wined3d/state.c
+2
-0
surface.c
dlls/wined3d/surface.c
+2
-0
utils.c
dlls/wined3d/utils.c
+3
-0
vertexshader.c
dlls/wined3d/vertexshader.c
+2
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
b35e469d
...
...
@@ -41,6 +41,8 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d);
#define GLINFO_LOCATION (*gl_info)
/* GL locking for state handlers is done by the caller. */
/* We have to subtract any other PARAMs that we might use in our shader programs.
* ATI seems to count 2 implicit PARAMs when we use fog and NVIDIA counts 1,
* and we reference one row of the PROJECTION matrix which counts as 1 PARAM. */
...
...
@@ -78,6 +80,7 @@ struct shader_arb_priv {
* @target_type should be either GL_VERTEX_PROGRAM_ARB (for vertex shaders)
* or GL_FRAGMENT_PROGRAM_ARB (for pixel shaders)
*/
/* GL locking is done by the caller */
static
unsigned
int
shader_arb_load_constantsF
(
IWineD3DBaseShaderImpl
*
This
,
const
WineD3D_GL_Info
*
gl_info
,
GLuint
target_type
,
unsigned
int
max_constants
,
const
float
*
constants
,
char
*
dirty_consts
)
{
...
...
@@ -189,6 +192,7 @@ static void shader_arb_load_np2fixup_constants(
* We only support float constants in ARB at the moment, so don't
* worry about the Integers or Booleans
*/
/* GL locking is done by the caller (state handler) */
static
void
shader_arb_load_constants
(
IWineD3DDevice
*
device
,
char
usePixelShader
,
...
...
@@ -1612,6 +1616,7 @@ static void shader_hw_sincos(const struct wined3d_shader_instruction *ins)
src_name
);
}
/* GL locking is done by the caller */
static
GLuint
create_arb_blt_vertex_program
(
const
WineD3D_GL_Info
*
gl_info
)
{
GLuint
program_id
=
0
;
...
...
@@ -1637,6 +1642,7 @@ static GLuint create_arb_blt_vertex_program(const WineD3D_GL_Info *gl_info)
return
program_id
;
}
/* GL locking is done by the caller */
static
GLuint
create_arb_blt_fragment_program
(
const
WineD3D_GL_Info
*
gl_info
,
enum
tex_types
tex_type
)
{
GLuint
program_id
=
0
;
...
...
@@ -1686,6 +1692,7 @@ static GLuint create_arb_blt_fragment_program(const WineD3D_GL_Info *gl_info, en
return
program_id
;
}
/* GL locking is done by the caller */
static
void
shader_arb_select
(
IWineD3DDevice
*
iface
,
BOOL
usePS
,
BOOL
useVS
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
shader_arb_priv
*
priv
=
This
->
shader_priv
;
...
...
@@ -1740,6 +1747,7 @@ static void shader_arb_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
}
}
/* GL locking is done by the caller */
static
void
shader_arb_select_depth_blt
(
IWineD3DDevice
*
iface
,
enum
tex_types
tex_type
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
shader_arb_priv
*
priv
=
This
->
shader_priv
;
...
...
@@ -1755,6 +1763,7 @@ static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types te
glEnable
(
GL_FRAGMENT_PROGRAM_ARB
);
}
/* GL locking is done by the caller */
static
void
shader_arb_deselect_depth_blt
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
shader_arb_priv
*
priv
=
This
->
shader_priv
;
...
...
@@ -1875,6 +1884,7 @@ static void arbfp_add_sRGB_correction(SHADER_BUFFER *buffer, const char *fragcol
/* [0.0;1.0] clamping. Not needed, this is done implicitly */
}
/* GL locking is done by the caller */
static
GLuint
shader_arb_generate_pshader
(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
,
const
struct
ps_compile_args
*
args
)
{
...
...
@@ -1968,6 +1978,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShader *iface,
return
retval
;
}
/* GL locking is done by the caller */
static
GLuint
shader_arb_generate_vshader
(
IWineD3DVertexShader
*
iface
,
SHADER_BUFFER
*
buffer
,
const
struct
vs_compile_args
*
args
)
{
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
b35e469d
...
...
@@ -28,6 +28,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_shader
);
WINE_DECLARE_DEBUG_CHANNEL
(
d3d
);
/* GL locking for state handlers is done by the caller. */
/* Some private defines, Constant associations, etc.
* Env bump matrix and per stage constant should be independent,
* a stage that bump maps can't read the per state constant
...
...
dlls/wined3d/basetexture.c
View file @
b35e469d
...
...
@@ -288,6 +288,7 @@ HRESULT basetexture_bind(IWineD3DBaseTexture *iface, BOOL srgb, BOOL *set_surfac
return
hr
;
}
/* GL locking is done by the caller */
static
inline
void
apply_wrap
(
const
GLint
textureDimensions
,
const
DWORD
state
,
const
GLint
type
,
BOOL
cond_np2
)
{
GLint
wrapParm
;
...
...
@@ -313,6 +314,7 @@ static inline void apply_wrap(const GLint textureDimensions, const DWORD state,
}
}
/* GL locking is done by the caller (state handler) */
void
basetexture_apply_state_changes
(
IWineD3DBaseTexture
*
iface
,
const
DWORD
textureStates
[
WINED3D_HIGHEST_TEXTURE_STATE
+
1
],
const
DWORD
samplerStates
[
WINED3D_HIGHEST_SAMPLER_STATE
+
1
])
...
...
dlls/wined3d/context.c
View file @
b35e469d
...
...
@@ -38,6 +38,7 @@ static IWineD3DDeviceImpl *last_device;
/* FBO helper functions */
/* GL locking is done by the caller */
void
context_bind_fbo
(
IWineD3DDevice
*
iface
,
GLenum
target
,
GLuint
*
fbo
)
{
const
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -53,6 +54,7 @@ void context_bind_fbo(IWineD3DDevice *iface, GLenum target, GLuint *fbo)
checkGLcall
(
"glBindFramebuffer()"
);
}
/* GL locking is done by the caller */
static
void
context_clean_fbo_attachments
(
IWineD3DDeviceImpl
*
This
)
{
unsigned
int
i
;
...
...
@@ -66,6 +68,7 @@ static void context_clean_fbo_attachments(IWineD3DDeviceImpl *This)
checkGLcall
(
"glFramebufferTexture2D()"
);
}
/* GL locking is done by the caller */
static
void
context_destroy_fbo
(
IWineD3DDeviceImpl
*
This
,
const
GLuint
*
fbo
)
{
GL_EXTCALL
(
glBindFramebufferEXT
(
GL_FRAMEBUFFER_EXT
,
*
fbo
));
...
...
@@ -79,6 +82,7 @@ static void context_destroy_fbo(IWineD3DDeviceImpl *This, const GLuint *fbo)
checkGLcall
(
"glDeleteFramebuffers()"
);
}
/* GL locking is done by the caller */
static
void
context_apply_attachment_filter_states
(
IWineD3DDevice
*
iface
,
IWineD3DSurface
*
surface
,
BOOL
force_preload
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -143,6 +147,7 @@ static void context_apply_attachment_filter_states(IWineD3DDevice *iface, IWineD
}
/* TODO: Handle stencil attachments */
/* GL locking is done by the caller */
void
context_attach_depth_stencil_fbo
(
IWineD3DDeviceImpl
*
This
,
GLenum
fbo_target
,
IWineD3DSurface
*
depth_stencil
,
BOOL
use_render_buffer
)
{
IWineD3DSurfaceImpl
*
depth_stencil_impl
=
(
IWineD3DSurfaceImpl
*
)
depth_stencil
;
...
...
@@ -168,6 +173,7 @@ void context_attach_depth_stencil_fbo(IWineD3DDeviceImpl *This, GLenum fbo_targe
}
}
/* GL locking is done by the caller */
void
context_attach_surface_fbo
(
IWineD3DDeviceImpl
*
This
,
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurface
*
surface
)
{
const
IWineD3DSurfaceImpl
*
surface_impl
=
(
IWineD3DSurfaceImpl
*
)
surface
;
...
...
@@ -187,6 +193,7 @@ void context_attach_surface_fbo(IWineD3DDeviceImpl *This, GLenum fbo_target, DWO
}
}
/* GL locking is done by the caller */
static
void
context_check_fbo_status
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -237,6 +244,7 @@ static struct fbo_entry *context_create_fbo_entry(IWineD3DDevice *iface)
return
entry
;
}
/* GL locking is done by the caller */
static
void
context_reuse_fbo_entry
(
IWineD3DDevice
*
iface
,
struct
fbo_entry
*
entry
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -250,6 +258,7 @@ static void context_reuse_fbo_entry(IWineD3DDevice *iface, struct fbo_entry *ent
entry
->
attached
=
FALSE
;
}
/* GL locking is done by the caller */
static
void
context_destroy_fbo_entry
(
IWineD3DDeviceImpl
*
This
,
struct
fbo_entry
*
entry
)
{
if
(
entry
->
id
)
...
...
@@ -263,6 +272,7 @@ static void context_destroy_fbo_entry(IWineD3DDeviceImpl *This, struct fbo_entry
}
/* GL locking is done by the caller */
static
struct
fbo_entry
*
context_find_fbo_entry
(
IWineD3DDevice
*
iface
,
WineD3DContext
*
context
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -296,6 +306,7 @@ static struct fbo_entry *context_find_fbo_entry(IWineD3DDevice *iface, WineD3DCo
return
entry
;
}
/* GL locking is done by the caller */
static
void
context_apply_fbo_entry
(
IWineD3DDevice
*
iface
,
struct
fbo_entry
*
entry
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -341,6 +352,7 @@ static void context_apply_fbo_entry(IWineD3DDevice *iface, struct fbo_entry *ent
}
}
/* GL locking is done by the caller */
static
void
context_apply_fbo_state
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -1073,6 +1085,7 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context) {
RemoveContextFromArray
(
This
,
context
);
}
/* GL locking is done by the caller */
static
inline
void
set_blit_dimension
(
UINT
width
,
UINT
height
)
{
glMatrixMode
(
GL_PROJECTION
);
checkGLcall
(
"glMatrixMode(GL_PROJECTION)"
);
...
...
dlls/wined3d/directx.c
View file @
b35e469d
...
...
@@ -453,6 +453,7 @@ static void select_shader_max_constants(
* IWineD3D parts follows
**********************************************************/
/* GL locking is done by the caller */
static
inline
BOOL
test_arb_vs_offset_limit
(
const
WineD3D_GL_Info
*
gl_info
)
{
GLuint
prog
;
...
...
dlls/wined3d/drawprim.c
View file @
b35e469d
...
...
@@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw);
#include <stdio.h>
#include <math.h>
/* GL locking is done by the caller */
static
void
drawStridedFast
(
IWineD3DDevice
*
iface
,
GLenum
primitive_type
,
UINT
min_vertex_idx
,
UINT
max_vertex_idx
,
UINT
count
,
UINT
idx_size
,
const
void
*
idx_data
,
UINT
start_idx
)
...
...
@@ -68,6 +69,7 @@ static void drawStridedFast(IWineD3DDevice *iface, GLenum primitive_type,
* Slower GL version which extracts info about each vertex in turn
*/
/* GL locking is done by the caller */
static
void
drawStridedSlow
(
IWineD3DDevice
*
iface
,
const
struct
wined3d_stream_info
*
si
,
UINT
NumVertexes
,
GLenum
glPrimType
,
const
void
*
idxData
,
UINT
idxSize
,
UINT
minIndex
,
UINT
startIdx
)
{
...
...
@@ -295,6 +297,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_stream_i
checkGLcall
(
"glEnd and previous calls"
);
}
/* GL locking is done by the caller */
static
inline
void
send_attribute
(
IWineD3DDeviceImpl
*
This
,
WINED3DFORMAT
format
,
const
UINT
index
,
const
void
*
ptr
)
{
switch
(
format
)
...
...
@@ -397,6 +400,7 @@ static inline void send_attribute(IWineD3DDeviceImpl *This, WINED3DFORMAT format
}
}
/* GL locking is done by the caller */
static
void
drawStridedSlowVs
(
IWineD3DDevice
*
iface
,
const
struct
wined3d_stream_info
*
si
,
UINT
numberOfVertices
,
GLenum
glPrimitiveType
,
const
void
*
idxData
,
UINT
idxSize
,
UINT
minIndex
,
UINT
startIdx
)
{
...
...
@@ -457,6 +461,7 @@ static void drawStridedSlowVs(IWineD3DDevice *iface, const struct wined3d_stream
glEnd
();
}
/* GL locking is done by the caller */
static
inline
void
drawStridedInstanced
(
IWineD3DDevice
*
iface
,
const
struct
wined3d_stream_info
*
si
,
UINT
numberOfVertices
,
GLenum
glPrimitiveType
,
const
void
*
idxData
,
UINT
idxSize
,
UINT
minIndex
,
UINT
startIdx
)
...
...
dlls/wined3d/glsl_shader.c
View file @
b35e469d
...
...
@@ -124,6 +124,7 @@ typedef struct {
/** Prints the GLSL info log which will contain error messages if they exist */
/* GL locking is done by the caller */
static
void
print_glsl_info_log
(
const
WineD3D_GL_Info
*
gl_info
,
GLhandleARB
obj
)
{
int
infologLength
=
0
;
...
...
@@ -181,6 +182,7 @@ static void print_glsl_info_log(const WineD3D_GL_Info *gl_info, GLhandleARB obj)
/**
* Loads (pixel shader) samplers
*/
/* GL locking is done by the caller */
static
void
shader_glsl_load_psamplers
(
const
WineD3D_GL_Info
*
gl_info
,
DWORD
*
tex_unit_map
,
GLhandleARB
programId
)
{
GLint
name_loc
;
...
...
@@ -204,6 +206,7 @@ static void shader_glsl_load_psamplers(const WineD3D_GL_Info *gl_info, DWORD *te
}
}
/* GL locking is done by the caller */
static
void
shader_glsl_load_vsamplers
(
const
WineD3D_GL_Info
*
gl_info
,
DWORD
*
tex_unit_map
,
GLhandleARB
programId
)
{
GLint
name_loc
;
...
...
@@ -227,6 +230,7 @@ static void shader_glsl_load_vsamplers(const WineD3D_GL_Info *gl_info, DWORD *te
}
}
/* GL locking is done by the caller */
static
inline
void
walk_constant_heap
(
const
WineD3D_GL_Info
*
gl_info
,
const
float
*
constants
,
const
GLint
*
constant_locations
,
const
struct
constant_heap
*
heap
,
unsigned
char
*
stack
,
DWORD
version
)
{
...
...
@@ -288,6 +292,7 @@ static inline void walk_constant_heap(const WineD3D_GL_Info *gl_info, const floa
checkGLcall
(
"walk_constant_heap()"
);
}
/* GL locking is done by the caller */
static
inline
void
apply_clamped_constant
(
const
WineD3D_GL_Info
*
gl_info
,
GLint
location
,
const
GLfloat
*
data
)
{
GLfloat
clamped_constant
[
4
];
...
...
@@ -302,6 +307,7 @@ static inline void apply_clamped_constant(const WineD3D_GL_Info *gl_info, GLint
GL_EXTCALL
(
glUniform4fvARB
(
location
,
1
,
clamped_constant
));
}
/* GL locking is done by the caller */
static
inline
void
walk_constant_heap_clamped
(
const
WineD3D_GL_Info
*
gl_info
,
const
float
*
constants
,
const
GLint
*
constant_locations
,
const
struct
constant_heap
*
heap
,
unsigned
char
*
stack
,
DWORD
version
)
{
...
...
@@ -362,6 +368,7 @@ static inline void walk_constant_heap_clamped(const WineD3D_GL_Info *gl_info, co
}
/* Loads floating point constants (aka uniforms) into the currently set GLSL program. */
/* GL locking is done by the caller */
static
void
shader_glsl_load_constantsF
(
IWineD3DBaseShaderImpl
*
This
,
const
WineD3D_GL_Info
*
gl_info
,
const
float
*
constants
,
const
GLint
*
constant_locations
,
const
struct
constant_heap
*
heap
,
unsigned
char
*
stack
,
UINT
version
)
...
...
@@ -392,6 +399,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl *This, const Wine
}
/* Loads integer constants (aka uniforms) into the currently set GLSL program. */
/* GL locking is done by the caller */
static
void
shader_glsl_load_constantsI
(
IWineD3DBaseShaderImpl
*
This
,
const
WineD3D_GL_Info
*
gl_info
,
const
GLint
locations
[
MAX_CONST_I
],
const
int
*
constants
,
WORD
constants_set
)
{
...
...
@@ -428,6 +436,7 @@ static void shader_glsl_load_constantsI(IWineD3DBaseShaderImpl *This, const Wine
}
/* Loads boolean constants (aka uniforms) into the currently set GLSL program. */
/* GL locking is done by the caller */
static
void
shader_glsl_load_constantsB
(
IWineD3DBaseShaderImpl
*
This
,
const
WineD3D_GL_Info
*
gl_info
,
GLhandleARB
programId
,
const
BOOL
*
constants
,
WORD
constants_set
)
{
...
...
@@ -487,6 +496,7 @@ static void reset_program_constant_version(void *value, void *context)
/**
* Loads the texture dimensions for NP2 fixup into the currently set GLSL program.
*/
/* GL locking is done by the caller (state handler) */
static
void
shader_glsl_load_np2fixup_constants
(
IWineD3DDevice
*
device
,
char
usePixelShader
,
...
...
@@ -529,6 +539,7 @@ static void shader_glsl_load_np2fixup_constants(
/**
* Loads the app-supplied constants into the currently set GLSL program.
*/
/* GL locking is done by the caller (state handler) */
static
void
shader_glsl_load_constants
(
IWineD3DDevice
*
device
,
char
usePixelShader
,
...
...
@@ -3197,6 +3208,7 @@ static struct glsl_shader_prog_link *get_glsl_program_entry(struct shader_glsl_p
return
hash_table_get
(
priv
->
glsl_program_lookup
,
&
key
);
}
/* GL locking is done by the caller */
static
void
delete_glsl_program_entry
(
struct
shader_glsl_priv
*
priv
,
const
WineD3D_GL_Info
*
gl_info
,
struct
glsl_shader_prog_link
*
entry
)
{
...
...
@@ -3363,6 +3375,7 @@ static void handle_ps3_input(SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_in
HeapFree
(
GetProcessHeap
(),
0
,
set
);
}
/* GL locking is done by the caller */
static
GLhandleARB
generate_param_reorder_function
(
IWineD3DVertexShader
*
vertexshader
,
IWineD3DPixelShader
*
pixelshader
,
const
WineD3D_GL_Info
*
gl_info
)
{
...
...
@@ -3508,6 +3521,7 @@ static GLhandleARB generate_param_reorder_function(IWineD3DVertexShader *vertexs
return
ret
;
}
/* GL locking is done by the caller */
static
void
hardcode_local_constants
(
IWineD3DBaseShaderImpl
*
shader
,
const
WineD3D_GL_Info
*
gl_info
,
GLhandleARB
programId
,
char
prefix
)
{
...
...
@@ -3533,6 +3547,8 @@ static void hardcode_local_constants(IWineD3DBaseShaderImpl *shader, const WineD
* the program in the hash table. If it creates a program, it will link the
* given objects, too.
*/
/* GL locking is done by the caller */
static
void
set_glsl_shader_program
(
IWineD3DDevice
*
iface
,
BOOL
use_ps
,
BOOL
use_vs
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
shader_glsl_priv
*
priv
=
This
->
shader_priv
;
...
...
@@ -3738,6 +3754,7 @@ static void set_glsl_shader_program(IWineD3DDevice *iface, BOOL use_ps, BOOL use
}
}
/* GL locking is done by the caller */
static
GLhandleARB
create_glsl_blt_shader
(
const
WineD3D_GL_Info
*
gl_info
,
enum
tex_types
tex_type
)
{
GLhandleARB
program_id
;
...
...
@@ -3812,6 +3829,7 @@ static GLhandleARB create_glsl_blt_shader(const WineD3D_GL_Info *gl_info, enum t
return
program_id
;
}
/* GL locking is done by the caller */
static
void
shader_glsl_select
(
IWineD3DDevice
*
iface
,
BOOL
usePS
,
BOOL
useVS
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
shader_glsl_priv
*
priv
=
This
->
shader_priv
;
...
...
@@ -3841,6 +3859,7 @@ static void shader_glsl_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
checkGLcall
(
"glUseProgramObjectARB"
);
}
/* GL locking is done by the caller */
static
void
shader_glsl_select_depth_blt
(
IWineD3DDevice
*
iface
,
enum
tex_types
tex_type
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
const
WineD3D_GL_Info
*
gl_info
=
&
This
->
adapter
->
gl_info
;
...
...
@@ -3858,6 +3877,7 @@ static void shader_glsl_select_depth_blt(IWineD3DDevice *iface, enum tex_types t
}
}
/* GL locking is done by the caller */
static
void
shader_glsl_deselect_depth_blt
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
const
WineD3D_GL_Info
*
gl_info
=
&
This
->
adapter
->
gl_info
;
...
...
@@ -4071,6 +4091,7 @@ static BOOL shader_glsl_dirty_const(IWineD3DDevice *iface) {
return
FALSE
;
}
/* GL locking is done by the caller */
static
GLuint
shader_glsl_generate_pshader
(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
,
const
struct
ps_compile_args
*
args
)
{
...
...
@@ -4177,6 +4198,7 @@ static GLuint shader_glsl_generate_pshader(IWineD3DPixelShader *iface,
return
shader_obj
;
}
/* GL locking is done by the caller */
static
GLuint
shader_glsl_generate_vshader
(
IWineD3DVertexShader
*
iface
,
SHADER_BUFFER
*
buffer
,
const
struct
vs_compile_args
*
args
)
{
...
...
dlls/wined3d/nvidia_texture_shader.c
View file @
b35e469d
...
...
@@ -29,6 +29,9 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
#define GLINFO_LOCATION stateblock->wineD3DDevice->adapter->gl_info
/* GL locking for state handlers is done by the caller. */
static
void
nvts_activate_dimensions
(
DWORD
stage
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
BOOL
bumpmap
=
FALSE
;
...
...
dlls/wined3d/pixelshader.c
View file @
b35e469d
...
...
@@ -338,6 +338,7 @@ static void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD
}
}
/* GL locking is done by the caller */
static
GLuint
pixelshader_compile
(
IWineD3DPixelShaderImpl
*
This
,
const
struct
ps_compile_args
*
args
)
{
CONST
DWORD
*
function
=
This
->
baseShader
.
function
;
...
...
@@ -440,6 +441,7 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImp
}
}
/* GL locking is done by the caller */
GLuint
find_gl_pshader
(
IWineD3DPixelShaderImpl
*
shader
,
const
struct
ps_compile_args
*
args
)
{
UINT
i
;
...
...
dlls/wined3d/state.c
View file @
b35e469d
...
...
@@ -36,6 +36,8 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_shader);
#define GLINFO_LOCATION stateblock->wineD3DDevice->adapter->gl_info
/* GL locking for state handlers is done by the caller. */
static
void
state_blendop
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
);
static
void
state_nogl
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
...
...
dlls/wined3d/surface.c
View file @
b35e469d
...
...
@@ -426,6 +426,7 @@ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, GLenum internal,
/* In D3D the depth stencil dimensions have to be greater than or equal to the
* render target dimensions. With FBOs, the dimensions have to be an exact match. */
/* TODO: We should synchronize the renderbuffer's content with the texture's content. */
/* GL locking is done by the caller */
void
surface_set_compatible_renderbuffer
(
IWineD3DSurface
*
iface
,
unsigned
int
width
,
unsigned
int
height
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
renderbuffer_entry_t
*
entry
;
...
...
@@ -4079,6 +4080,7 @@ static void surface_get_depth_blt_info(GLenum target, GLsizei w, GLsizei h, stru
}
}
/* GL locking is done by the caller */
static
void
surface_depth_blt
(
IWineD3DSurfaceImpl
*
This
,
GLuint
texture
,
GLsizei
w
,
GLsizei
h
,
GLenum
target
)
{
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
...
...
dlls/wined3d/utils.c
View file @
b35e469d
...
...
@@ -1516,6 +1516,7 @@ BOOL is_invalid_op(IWineD3DDeviceImpl *This, int stage, WINED3DTEXTUREOP op, DWO
}
/* Setup this textures matrix according to the texture flags*/
/* GL locking is done by the caller (state handler) */
void
set_texture_matrix
(
const
float
*
smat
,
DWORD
flags
,
BOOL
calculatedCoords
,
BOOL
transformed
,
WINED3DFORMAT
vtx_fmt
,
BOOL
ffp_proj_control
)
{
...
...
@@ -2384,6 +2385,7 @@ void add_ffp_frag_shader(struct hash_table_t *shaders, struct ffp_frag_desc *des
* Requires the caller to activate the correct unit before
*/
#define GLINFO_LOCATION stateblock->wineD3DDevice->adapter->gl_info
/* GL locking is done by the caller (state handler) */
void
texture_activate_dimensions
(
DWORD
stage
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
if
(
stateblock
->
textures
[
stage
])
{
switch
(
IWineD3DBaseTexture_GetTextureDimensions
(
stateblock
->
textures
[
stage
]))
{
...
...
@@ -2457,6 +2459,7 @@ void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock
}
}
/* GL locking is done by the caller (state handler) */
void
sampler_texdim
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
DWORD
sampler
=
state
-
STATE_SAMPLER
(
0
);
DWORD
mapped_stage
=
stateblock
->
wineD3DDevice
->
texUnitMap
[
sampler
];
...
...
dlls/wined3d/vertexshader.c
View file @
b35e469d
...
...
@@ -351,6 +351,7 @@ static HRESULT WINAPI IWIneD3DVertexShaderImpl_SetLocalConstantsF(IWineD3DVertex
return
WINED3D_OK
;
}
/* GL locking is done by the caller */
static
GLuint
vertexshader_compile
(
IWineD3DVertexShaderImpl
*
This
,
const
struct
vs_compile_args
*
args
)
{
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
SHADER_BUFFER
buffer
;
...
...
@@ -395,6 +396,7 @@ static inline BOOL vs_args_equal(const struct vs_compile_args *stored, const str
return
stored
->
fog_src
==
new
->
fog_src
;
}
/* GL locking is done by the caller */
GLuint
find_gl_vshader
(
IWineD3DVertexShaderImpl
*
shader
,
const
struct
vs_compile_args
*
args
)
{
UINT
i
;
...
...
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