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
ede01abe
Commit
ede01abe
authored
Mar 20, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Support GL_ATI_envmap_bumpmap for D3DFMT_V8U8.
parent
e213d7ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+5
-4
surface.c
dlls/wined3d/surface.c
+12
-4
No files found.
dlls/wined3d/arb_program_shader.c
View file @
ede01abe
...
@@ -715,11 +715,12 @@ void pshader_hw_texbem(SHADER_OPCODE_ARG* arg) {
...
@@ -715,11 +715,12 @@ void pshader_hw_texbem(SHADER_OPCODE_ARG* arg) {
* So the surface loading code converts the -128 ... 127 signed integers to
* So the surface loading code converts the -128 ... 127 signed integers to
* 0 ... 255 unsigned ones. The following line undoes that.
* 0 ... 255 unsigned ones. The following line undoes that.
*
*
* TODO: GL_ATI_envmap_bumpmap provides pixel formats
* TODO: GL_ATI_envmap_bumpmap supports D3DFMT_DU8DV8 only. If conversion for other formats
* suitable for loading the Direct3D perturbation data. If it is used, do
* is implemented check the texture format.
* not correct the signedness
*
* TODO: Move that to the common sampling function
*/
*/
if
(
!
GL_SUPPORT
(
NV_TEXTURE_SHADER3
))
if
(
!
GL_SUPPORT
(
NV_TEXTURE_SHADER3
)
&&
!
GL_SUPPORT
(
ATI_ENVMAP_BUMPMAP
)
)
shader_addline
(
buffer
,
"MAD T%u, T%u, coefmul.x, -one;
\n
"
,
src
,
src
);
shader_addline
(
buffer
,
"MAD T%u, T%u, coefmul.x, -one;
\n
"
,
src
,
src
);
shader_addline
(
buffer
,
"SWZ TMP2, bumpenvmat, x, z, 0, 0;
\n
"
);
shader_addline
(
buffer
,
"SWZ TMP2, bumpenvmat, x, z, 0, 0;
\n
"
);
...
...
dlls/wined3d/surface.c
View file @
ede01abe
...
@@ -1464,11 +1464,14 @@ static HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BO
...
@@ -1464,11 +1464,14 @@ static HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BO
break
;
break
;
case
WINED3DFMT_V8U8
:
case
WINED3DFMT_V8U8
:
/* TODO: GL_ATI_envmap_bumpmap provides suitable formats.
* use it instead of converting
* Remember to adjust the texbem instruction in the shader
*/
if
(
GL_SUPPORT
(
NV_TEXTURE_SHADER3
))
break
;
if
(
GL_SUPPORT
(
NV_TEXTURE_SHADER3
))
break
;
else
if
(
GL_SUPPORT
(
ATI_ENVMAP_BUMPMAP
))
{
*
format
=
GL_DUDV_ATI
;
*
internal
=
GL_DU8DV8_ATI
;
*
type
=
GL_BYTE
;
/* No conversion - Just change the gl type */
break
;
}
*
convert
=
CONVERT_V8U8
;
*
convert
=
CONVERT_V8U8
;
*
format
=
GL_BGR
;
*
format
=
GL_BGR
;
*
internal
=
GL_RGB8
;
*
internal
=
GL_RGB8
;
...
@@ -1483,6 +1486,7 @@ static HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BO
...
@@ -1483,6 +1486,7 @@ static HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BO
*
internal
=
GL_RGBA8
;
*
internal
=
GL_RGBA8
;
*
type
=
GL_BYTE
;
*
type
=
GL_BYTE
;
*
target_bpp
=
4
;
*
target_bpp
=
4
;
/* Not supported by GL_ATI_envmap_bumpmap */
break
;
break
;
case
WINED3DFMT_Q8W8V8U8
:
case
WINED3DFMT_Q8W8V8U8
:
...
@@ -1492,6 +1496,7 @@ static HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BO
...
@@ -1492,6 +1496,7 @@ static HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BO
*
internal
=
GL_RGBA8
;
*
internal
=
GL_RGBA8
;
*
type
=
GL_BYTE
;
*
type
=
GL_BYTE
;
*
target_bpp
=
4
;
*
target_bpp
=
4
;
/* Not supported by GL_ATI_envmap_bumpmap */
break
;
break
;
case
WINED3DFMT_V16U16
:
case
WINED3DFMT_V16U16
:
...
@@ -1501,6 +1506,9 @@ static HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BO
...
@@ -1501,6 +1506,9 @@ static HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BO
*
internal
=
GL_COLOR_INDEX
;
*
internal
=
GL_COLOR_INDEX
;
*
type
=
GL_SHORT
;
*
type
=
GL_SHORT
;
*
target_bpp
=
4
;
*
target_bpp
=
4
;
/* What should I do here about GL_ATI_envmap_bumpmap?
* Convert it or allow data loss by loading it into a 8 bit / channel texture?
*/
break
;
break
;
default:
default:
...
...
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