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
a1364d11
Commit
a1364d11
authored
Jan 21, 2008
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Jan 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't use texture_rectangle for paletted textures.
parent
29bbc694
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
device.c
dlls/wined3d/device.c
+8
-2
surface.c
dlls/wined3d/surface.c
+8
-2
No files found.
dlls/wined3d/device.c
View file @
a1364d11
...
...
@@ -894,9 +894,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
}
/** FIXME: add support for real non-power-two if it's provided by the video card **/
/* Precalculated scaling for 'faked' non power of two texture coords */
/* Precalculated scaling for 'faked' non power of two texture coords.
Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE
is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE
doesn't work in combination with ARB_TEXTURE_RECTANGLE.
*/
if
(
GL_SUPPORT
(
ARB_TEXTURE_RECTANGLE
)
&&
(
Width
!=
pow2Width
||
Height
!=
pow2Height
))
{
(
Width
!=
pow2Width
||
Height
!=
pow2Height
)
&&
!
((
Format
==
WINED3DFMT_P8
)
&&
GL_SUPPORT
(
EXT_PALETTED_TEXTURE
)
&&
(
wined3d_settings
.
rendertargetlock_mode
==
RTL_READTEX
||
wined3d_settings
.
rendertargetlock_mode
==
RTL_TEXTEX
)))
{
object
->
baseTexture
.
pow2Matrix
[
0
]
=
(
float
)
Width
;
object
->
baseTexture
.
pow2Matrix
[
5
]
=
(
float
)
Height
;
object
->
baseTexture
.
pow2Matrix
[
10
]
=
1
.
0
;
...
...
dlls/wined3d/surface.c
View file @
a1364d11
...
...
@@ -3463,8 +3463,14 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
This
->
glRect
.
right
=
0
;
This
->
glRect
.
bottom
=
0
;
}
else
{
/* Check this after the oversize check - do not make an oversized surface a texture_rectangle one */
if
(
This
->
Flags
&
SFLAG_NONPOW2
&&
GL_SUPPORT
(
ARB_TEXTURE_RECTANGLE
))
{
/* Check this after the oversize check - do not make an oversized surface a texture_rectangle one.
Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE
is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE
doesn't work in combination with ARB_TEXTURE_RECTANGLE.
*/
if
(
This
->
Flags
&
SFLAG_NONPOW2
&&
GL_SUPPORT
(
ARB_TEXTURE_RECTANGLE
)
&&
!
((
This
->
resource
.
format
==
WINED3DFMT_P8
)
&&
GL_SUPPORT
(
EXT_PALETTED_TEXTURE
)
&&
(
wined3d_settings
.
rendertargetlock_mode
==
RTL_READTEX
||
wined3d_settings
.
rendertargetlock_mode
==
RTL_TEXTEX
)))
{
This
->
glDescription
.
target
=
GL_TEXTURE_RECTANGLE_ARB
;
This
->
pow2Width
=
This
->
currentDesc
.
Width
;
This
->
pow2Height
=
This
->
currentDesc
.
Height
;
...
...
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