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
55047f81
Commit
55047f81
authored
Oct 22, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix some GLINFO_LOCATION abuse.
parent
57112545
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
19 deletions
+19
-19
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+6
-6
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+1
-1
device.c
dlls/wined3d/device.c
+3
-3
glsl_shader.c
dlls/wined3d/glsl_shader.c
+7
-7
state.c
dlls/wined3d/state.c
+1
-1
surface.c
dlls/wined3d/surface.c
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
55047f81
...
@@ -53,7 +53,7 @@ static BOOL need_mova_const(IWineD3DBaseShader *shader, const struct wined3d_gl_
...
@@ -53,7 +53,7 @@ static BOOL need_mova_const(IWineD3DBaseShader *shader, const struct wined3d_gl_
static
inline
BOOL
use_nv_clip
(
const
struct
wined3d_gl_info
*
gl_info
)
static
inline
BOOL
use_nv_clip
(
const
struct
wined3d_gl_info
*
gl_info
)
{
{
return
GL_SUPPORT
(
NV_VERTEX_PROGRAM2_OPTION
)
&&
return
GL_SUPPORT
(
NV_VERTEX_PROGRAM2_OPTION
)
&&
!
(
GLINFO_LOCATION
.
quirks
&
WINED3D_QUIRK_NV_CLIP_BROKEN
);
!
(
gl_info
->
quirks
&
WINED3D_QUIRK_NV_CLIP_BROKEN
);
}
}
static
BOOL
need_helper_const
(
const
struct
wined3d_gl_info
*
gl_info
)
static
BOOL
need_helper_const
(
const
struct
wined3d_gl_info
*
gl_info
)
...
@@ -3394,8 +3394,8 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct
...
@@ -3394,8 +3394,8 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct
}
}
/* Base Declarations */
/* Base Declarations */
next_local
=
shader_generate_arb_declarations
(
(
IWineD3DBaseShader
*
)
This
,
reg_maps
,
buffer
,
&
GLINFO_LOCATION
,
next_local
=
shader_generate_arb_declarations
(
(
IWineD3DBaseShader
*
)
This
,
lconst_map
,
NULL
,
&
priv_ctx
);
reg_maps
,
buffer
,
gl_info
,
lconst_map
,
NULL
,
&
priv_ctx
);
for
(
i
=
0
,
map
=
reg_maps
->
bumpmat
;
map
;
map
>>=
1
,
++
i
)
for
(
i
=
0
,
map
=
reg_maps
->
bumpmat
;
map
;
map
>>=
1
,
++
i
)
{
{
...
@@ -3867,8 +3867,8 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct
...
@@ -3867,8 +3867,8 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct
shader_addline
(
buffer
,
"TEMP TA;
\n
"
);
shader_addline
(
buffer
,
"TEMP TA;
\n
"
);
/* Base Declarations */
/* Base Declarations */
next_local
=
shader_generate_arb_declarations
(
(
IWineD3DBaseShader
*
)
This
,
reg_maps
,
buffer
,
&
GLINFO_LOCATION
,
next_local
=
shader_generate_arb_declarations
(
(
IWineD3DBaseShader
*
)
This
,
lconst_map
,
&
priv_ctx
.
vs_clipplanes
,
&
priv_ctx
);
reg_maps
,
buffer
,
gl_info
,
lconst_map
,
&
priv_ctx
.
vs_clipplanes
,
&
priv_ctx
);
for
(
i
=
0
;
i
<
MAX_CONST_I
;
i
++
)
for
(
i
=
0
;
i
<
MAX_CONST_I
;
i
++
)
{
{
...
@@ -3909,7 +3909,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct
...
@@ -3909,7 +3909,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct
if
(
!
GL_SUPPORT
(
NV_VERTEX_PROGRAM
))
{
if
(
!
GL_SUPPORT
(
NV_VERTEX_PROGRAM
))
{
shader_addline
(
buffer
,
"MOV result.color.secondary, -helper_const.wwwy;
\n
"
);
shader_addline
(
buffer
,
"MOV result.color.secondary, -helper_const.wwwy;
\n
"
);
if
(
(
GLINFO_LOCATION
).
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
&&
!
device
->
frag_pipe
->
ffp_proj_control
)
if
(
gl_info
->
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
&&
!
device
->
frag_pipe
->
ffp_proj_control
)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
min
(
8
,
MAX_REG_TEXCRD
);
i
++
)
{
for
(
i
=
0
;
i
<
min
(
8
,
MAX_REG_TEXCRD
);
i
++
)
{
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
55047f81
...
@@ -821,7 +821,7 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, st
...
@@ -821,7 +821,7 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, st
}
}
memcpy
(
&
new_desc
->
parent
.
settings
,
&
settings
,
sizeof
(
settings
));
memcpy
(
&
new_desc
->
parent
.
settings
,
&
settings
,
sizeof
(
settings
));
new_desc
->
shader
=
gen_ati_shader
(
settings
.
op
,
&
GLINFO_LOCATION
);
new_desc
->
shader
=
gen_ati_shader
(
settings
.
op
,
context
->
gl_info
);
add_ffp_frag_shader
(
&
priv
->
fragment_shaders
,
&
new_desc
->
parent
);
add_ffp_frag_shader
(
&
priv
->
fragment_shaders
,
&
new_desc
->
parent
);
TRACE
(
"Allocated fixed function replacement shader descriptor %p
\n
"
,
new_desc
);
TRACE
(
"Allocated fixed function replacement shader descriptor %p
\n
"
,
new_desc
);
desc
=
new_desc
;
desc
=
new_desc
;
...
...
dlls/wined3d/device.c
View file @
55047f81
...
@@ -1108,7 +1108,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice *iface,
...
@@ -1108,7 +1108,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice *iface,
object
->
orig_width
=
Mode
.
Width
;
object
->
orig_width
=
Mode
.
Width
;
object
->
orig_height
=
Mode
.
Height
;
object
->
orig_height
=
Mode
.
Height
;
object
->
orig_fmt
=
Mode
.
Format
;
object
->
orig_fmt
=
Mode
.
Format
;
format_desc
=
getFormatDescEntry
(
Mode
.
Format
,
&
GLINFO_LOCATION
);
format_desc
=
getFormatDescEntry
(
Mode
.
Format
,
&
This
->
adapter
->
gl_info
);
if
(
pPresentationParameters
->
Windowed
&&
if
(
pPresentationParameters
->
Windowed
&&
((
pPresentationParameters
->
BackBufferWidth
==
0
)
||
((
pPresentationParameters
->
BackBufferWidth
==
0
)
||
...
@@ -2135,7 +2135,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U
...
@@ -2135,7 +2135,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U
DEVMODEW
devmode
;
DEVMODEW
devmode
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
LONG
ret
;
LONG
ret
;
const
struct
GlPixelFormatDesc
*
format_desc
=
getFormatDescEntry
(
pMode
->
Format
,
&
GLINFO_LOCATION
);
const
struct
GlPixelFormatDesc
*
format_desc
=
getFormatDescEntry
(
pMode
->
Format
,
&
This
->
adapter
->
gl_info
);
RECT
clip_rc
;
RECT
clip_rc
;
TRACE
(
"(%p)->(%d,%p) Mode=%dx%dx@%d, %s
\n
"
,
This
,
iSwapChain
,
pMode
,
pMode
->
Width
,
pMode
->
Height
,
pMode
->
RefreshRate
,
debug_d3dformat
(
pMode
->
Format
));
TRACE
(
"(%p)->(%d,%p) Mode=%dx%dx@%d, %s
\n
"
,
This
,
iSwapChain
,
pMode
,
pMode
->
Width
,
pMode
->
Height
,
pMode
->
RefreshRate
,
debug_d3dformat
(
pMode
->
Format
));
...
@@ -6285,7 +6285,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice* i
...
@@ -6285,7 +6285,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice* i
if
(
SUCCEEDED
(
IWineD3DSurface_LockRect
(
pCursorBitmap
,
&
rect
,
NULL
,
WINED3DLOCK_READONLY
)))
if
(
SUCCEEDED
(
IWineD3DSurface_LockRect
(
pCursorBitmap
,
&
rect
,
NULL
,
WINED3DLOCK_READONLY
)))
{
{
const
struct
GlPixelFormatDesc
*
glDesc
=
const
struct
GlPixelFormatDesc
*
glDesc
=
getFormatDescEntry
(
WINED3DFMT_B8G8R8A8_UNORM
,
&
GLINFO_LOCATION
);
getFormatDescEntry
(
WINED3DFMT_B8G8R8A8_UNORM
,
&
This
->
adapter
->
gl_info
);
char
*
mem
,
*
bits
=
rect
.
pBits
;
char
*
mem
,
*
bits
=
rect
.
pBits
;
GLint
intfmt
=
glDesc
->
glInternal
;
GLint
intfmt
=
glDesc
->
glInternal
;
GLint
format
=
glDesc
->
glFormat
;
GLint
format
=
glDesc
->
glFormat
;
...
...
dlls/wined3d/glsl_shader.c
View file @
55047f81
...
@@ -862,7 +862,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
...
@@ -862,7 +862,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
*/
*/
max_constantsF
-=
count_bits
(
This
->
baseShader
.
reg_maps
.
boolean_constants
);
max_constantsF
-=
count_bits
(
This
->
baseShader
.
reg_maps
.
boolean_constants
);
/* Set by driver quirks in directx.c */
/* Set by driver quirks in directx.c */
max_constantsF
-=
GLINFO_LOCATION
.
reserved_glsl_constants
;
max_constantsF
-=
gl_info
->
reserved_glsl_constants
;
}
else
{
}
else
{
max_constantsF
=
GL_LIMITS
(
vs_glsl_constantsF
);
max_constantsF
=
GL_LIMITS
(
vs_glsl_constantsF
);
}
}
...
@@ -3575,7 +3575,7 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer
...
@@ -3575,7 +3575,7 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer
* Take care about the texcoord .w fixup though if we're using the fixed function fragment pipeline
* Take care about the texcoord .w fixup though if we're using the fixed function fragment pipeline
*/
*/
device
=
(
IWineD3DDeviceImpl
*
)
vs
->
baseShader
.
device
;
device
=
(
IWineD3DDeviceImpl
*
)
vs
->
baseShader
.
device
;
if
((
(
GLINFO_LOCATION
).
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
if
((
gl_info
->
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
&&
ps_major
==
0
&&
vs_major
>
0
&&
!
device
->
frag_pipe
->
ffp_proj_control
)
&&
ps_major
==
0
&&
vs_major
>
0
&&
!
device
->
frag_pipe
->
ffp_proj_control
)
{
{
shader_addline
(
buffer
,
"void order_ps_input() {
\n
"
);
shader_addline
(
buffer
,
"void order_ps_input() {
\n
"
);
...
@@ -3622,7 +3622,7 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer
...
@@ -3622,7 +3622,7 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer
{
{
if
(
semantic_idx
<
8
)
if
(
semantic_idx
<
8
)
{
{
if
(
!
(
(
GLINFO_LOCATION
).
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
||
ps_major
>
0
)
if
(
!
(
gl_info
->
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
||
ps_major
>
0
)
write_mask
|=
WINED3DSP_WRITEMASK_3
;
write_mask
|=
WINED3DSP_WRITEMASK_3
;
shader_addline
(
buffer
,
"gl_TexCoord[%u]%s = OUT[%u]%s;
\n
"
,
shader_addline
(
buffer
,
"gl_TexCoord[%u]%s = OUT[%u]%s;
\n
"
,
...
@@ -3809,7 +3809,7 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
...
@@ -3809,7 +3809,7 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
TRACE
(
"Compiling shader object %u
\n
"
,
shader_obj
);
TRACE
(
"Compiling shader object %u
\n
"
,
shader_obj
);
GL_EXTCALL
(
glShaderSourceARB
(
shader_obj
,
1
,
(
const
char
**
)
&
buffer
->
buffer
,
NULL
));
GL_EXTCALL
(
glShaderSourceARB
(
shader_obj
,
1
,
(
const
char
**
)
&
buffer
->
buffer
,
NULL
));
GL_EXTCALL
(
glCompileShaderARB
(
shader_obj
));
GL_EXTCALL
(
glCompileShaderARB
(
shader_obj
));
print_glsl_info_log
(
&
GLINFO_LOCATION
,
shader_obj
);
print_glsl_info_log
(
gl_info
,
shader_obj
);
/* Store the shader object */
/* Store the shader object */
return
shader_obj
;
return
shader_obj
;
...
@@ -3878,7 +3878,7 @@ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context
...
@@ -3878,7 +3878,7 @@ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context
TRACE
(
"Compiling shader object %u
\n
"
,
shader_obj
);
TRACE
(
"Compiling shader object %u
\n
"
,
shader_obj
);
GL_EXTCALL
(
glShaderSourceARB
(
shader_obj
,
1
,
(
const
char
**
)
&
buffer
->
buffer
,
NULL
));
GL_EXTCALL
(
glShaderSourceARB
(
shader_obj
,
1
,
(
const
char
**
)
&
buffer
->
buffer
,
NULL
));
GL_EXTCALL
(
glCompileShaderARB
(
shader_obj
));
GL_EXTCALL
(
glCompileShaderARB
(
shader_obj
));
print_glsl_info_log
(
&
GLINFO_LOCATION
,
shader_obj
);
print_glsl_info_log
(
gl_info
,
shader_obj
);
return
shader_obj
;
return
shader_obj
;
}
}
...
@@ -4130,7 +4130,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context,
...
@@ -4130,7 +4130,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context,
/* Link the program */
/* Link the program */
TRACE
(
"Linking GLSL shader program %u
\n
"
,
programId
);
TRACE
(
"Linking GLSL shader program %u
\n
"
,
programId
);
GL_EXTCALL
(
glLinkProgramARB
(
programId
));
GL_EXTCALL
(
glLinkProgramARB
(
programId
));
print_glsl_info_log
(
&
GLINFO_LOCATION
,
programId
);
print_glsl_info_log
(
gl_info
,
programId
);
entry
->
vuniformF_locations
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
GLhandleARB
)
*
GL_LIMITS
(
vs_glsl_constantsF
));
entry
->
vuniformF_locations
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
GLhandleARB
)
*
GL_LIMITS
(
vs_glsl_constantsF
));
for
(
i
=
0
;
i
<
GL_LIMITS
(
vs_glsl_constantsF
);
++
i
)
{
for
(
i
=
0
;
i
<
GL_LIMITS
(
vs_glsl_constantsF
);
++
i
)
{
...
@@ -4278,7 +4278,7 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info,
...
@@ -4278,7 +4278,7 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info,
GL_EXTCALL
(
glAttachObjectARB
(
program_id
,
pshader_id
));
GL_EXTCALL
(
glAttachObjectARB
(
program_id
,
pshader_id
));
GL_EXTCALL
(
glLinkProgramARB
(
program_id
));
GL_EXTCALL
(
glLinkProgramARB
(
program_id
));
print_glsl_info_log
(
&
GLINFO_LOCATION
,
program_id
);
print_glsl_info_log
(
gl_info
,
program_id
);
/* Once linked we can mark the shaders for deletion. They will be deleted once the program
/* Once linked we can mark the shaders for deletion. They will be deleted once the program
* is destroyed
* is destroyed
...
...
dlls/wined3d/state.c
View file @
55047f81
...
@@ -4322,7 +4322,7 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
...
@@ -4322,7 +4322,7 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB
curVBO
=
e
->
buffer_object
;
curVBO
=
e
->
buffer_object
;
}
}
if
(
format
!=
4
||
(
GLINFO_LOCATION
.
quirks
&
WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA
))
if
(
format
!=
4
||
(
context
->
gl_info
->
quirks
&
WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA
))
{
{
/* Usually specular colors only allow 3 components, since they have no alpha. In D3D, the specular alpha
/* Usually specular colors only allow 3 components, since they have no alpha. In D3D, the specular alpha
* contains the fog coordinate, which is passed to GL with GL_EXT_fog_coord. However, the fixed function
* contains the fog coordinate, which is passed to GL with GL_EXT_fog_coord. However, the fixed function
...
...
dlls/wined3d/surface.c
View file @
55047f81
...
@@ -126,7 +126,7 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type,
...
@@ -126,7 +126,7 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type,
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
WINED3DPOOL
pool
,
IUnknown
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
GlPixelFormatDesc
*
format_desc
=
getFormatDescEntry
(
format
,
&
GLINFO_LOCATION
);
const
struct
GlPixelFormatDesc
*
format_desc
=
getFormatDescEntry
(
format
,
gl_info
);
void
(
*
cleanup
)(
IWineD3DSurfaceImpl
*
This
);
void
(
*
cleanup
)(
IWineD3DSurfaceImpl
*
This
);
unsigned
int
resource_size
;
unsigned
int
resource_size
;
HRESULT
hr
;
HRESULT
hr
;
...
...
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