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
812a3148
Commit
812a3148
authored
Aug 04, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the fglrx point sprite hack.
Fglrx 9.3 is well over 2 years old at this point. I'd strongly encourage anyone still affected by this to upgrade to the r300g driver.
parent
293bf961
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
59 deletions
+7
-59
context.c
dlls/wined3d/context.c
+7
-4
directx.c
dlls/wined3d/directx.c
+0
-41
state.c
dlls/wined3d/state.c
+0
-13
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
No files found.
dlls/wined3d/context.c
View file @
812a3148
...
...
@@ -1522,11 +1522,14 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
GL_EXTCALL
(
glProgramStringARB
(
GL_FRAGMENT_PROGRAM_ARB
,
GL_PROGRAM_FORMAT_ASCII_ARB
,
strlen
(
dummy_program
),
dummy_program
));
}
for
(
s
=
0
;
s
<
gl_info
->
limits
.
point_sprite_units
;
++
s
)
if
(
gl_info
->
supported
[
ARB_POINT_SPRITE
]
)
{
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
s
));
glTexEnvi
(
GL_POINT_SPRITE_ARB
,
GL_COORD_REPLACE_ARB
,
GL_TRUE
);
checkGLcall
(
"glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)"
);
for
(
s
=
0
;
s
<
gl_info
->
limits
.
textures
;
++
s
)
{
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
s
));
glTexEnvi
(
GL_POINT_SPRITE_ARB
,
GL_COORD_REPLACE_ARB
,
GL_TRUE
);
checkGLcall
(
"glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)"
);
}
}
if
(
gl_info
->
supported
[
ARB_PROVOKING_VERTEX
])
...
...
dlls/wined3d/directx.c
View file @
812a3148
...
...
@@ -596,13 +596,6 @@ static BOOL match_apple_nonr500ati(const struct wined3d_gl_info *gl_info, const
return
TRUE
;
}
static
BOOL
match_fglrx
(
const
struct
wined3d_gl_info
*
gl_info
,
const
char
*
gl_renderer
,
enum
wined3d_gl_vendor
gl_vendor
,
enum
wined3d_pci_vendor
card_vendor
,
enum
wined3d_pci_device
device
)
{
return
gl_vendor
==
GL_VENDOR_FGLRX
;
}
static
BOOL
match_dx10_capable
(
const
struct
wined3d_gl_info
*
gl_info
,
const
char
*
gl_renderer
,
enum
wined3d_gl_vendor
gl_vendor
,
enum
wined3d_pci_vendor
card_vendor
,
enum
wined3d_pci_device
device
)
{
...
...
@@ -801,27 +794,6 @@ static void quirk_apple_glsl_constants(struct wined3d_gl_info *gl_info)
gl_info
->
reserved_glsl_constants
=
max
(
gl_info
->
reserved_glsl_constants
,
12
);
}
/* fglrx crashes with a very bad kernel panic if GL_POINT_SPRITE_ARB is set to GL_COORD_REPLACE_ARB
* on more than one texture unit. This means that the d3d9 visual point size test will cause a
* kernel panic on any machine running fglrx 9.3(latest that supports r300 to r500 cards). This
* quirk only enables point sprites on the first texture unit. This keeps point sprites working in
* most games, but avoids the crash
*
* A more sophisticated way would be to find all units that need texture coordinates and enable
* point sprites for one if only one is found, and software emulate point sprites in drawStridedSlow
* if more than one unit needs texture coordinates(This requires software ffp and vertex shaders though)
*
* Note that disabling the extension entirely does not gain predictability because there is no point
* sprite capability flag in d3d, so the potential rendering bugs are the same if we disable the extension. */
static
void
quirk_one_point_sprite
(
struct
wined3d_gl_info
*
gl_info
)
{
if
(
gl_info
->
supported
[
ARB_POINT_SPRITE
])
{
TRACE
(
"Limiting point sprites to one texture unit.
\n
"
);
gl_info
->
limits
.
point_sprite_units
=
1
;
}
}
static
void
quirk_amd_dx9
(
struct
wined3d_gl_info
*
gl_info
)
{
quirk_arb_constants
(
gl_info
);
...
...
@@ -963,11 +935,6 @@ static const struct driver_quirk quirk_table[] =
"Init texcoord .w for Apple ATI >= r600 GPU driver"
},
{
match_fglrx
,
quirk_one_point_sprite
,
"Fglrx point sprite crash workaround"
},
{
match_dx10_capable
,
quirk_clip_varying
,
"Reserved varying for gl_ClipPos"
...
...
@@ -2625,14 +2592,6 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
/* GL_ARB_half_float_vertex is a subset of GL_NV_half_float. */
gl_info
->
supported
[
ARB_HALF_FLOAT_VERTEX
]
=
TRUE
;
}
if
(
gl_info
->
supported
[
ARB_POINT_SPRITE
])
{
gl_info
->
limits
.
point_sprite_units
=
gl_info
->
limits
.
textures
;
}
else
{
gl_info
->
limits
.
point_sprite_units
=
0
;
}
checkGLcall
(
"extension detection"
);
LEAVE_GL
();
...
...
dlls/wined3d/state.c
View file @
812a3148
...
...
@@ -1594,21 +1594,8 @@ static void state_pointsprite_w(struct wined3d_context *context, const struct wi
static
void
state_pointsprite
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
if
(
state
->
render_states
[
WINED3DRS_POINTSPRITEENABLE
])
{
static
BOOL
warned
;
if
(
gl_info
->
limits
.
point_sprite_units
<
gl_info
->
limits
.
textures
&&
!
warned
)
{
if
(
use_ps
(
state
)
||
state
->
lowest_disabled_stage
>
gl_info
->
limits
.
point_sprite_units
)
{
FIXME
(
"The app uses point sprite texture coordinates on more units than supported by the driver
\n
"
);
warned
=
TRUE
;
}
}
glEnable
(
GL_POINT_SPRITE_ARB
);
checkGLcall
(
"glEnable(GL_POINT_SPRITE_ARB)"
);
}
else
{
...
...
dlls/wined3d/wined3d_private.h
View file @
812a3148
...
...
@@ -1445,7 +1445,6 @@ struct wined3d_gl_limits
UINT
texture3d_size
;
float
pointsize_max
;
float
pointsize_min
;
UINT
point_sprite_units
;
UINT
blends
;
UINT
anisotropy
;
float
shininess
;
...
...
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