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
66447040
Commit
66447040
authored
Sep 05, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 01, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add texreg2rgb support to arb shaders.
parent
dbfb6b04
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+16
-0
pixelshader.c
dlls/wined3d/pixelshader.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
66447040
...
...
@@ -1118,6 +1118,22 @@ void pshader_hw_texreg2gb(SHADER_OPCODE_ARG* arg) {
shader_hw_sample
(
arg
,
reg1
,
dst_str
,
"TMP"
,
FALSE
,
FALSE
);
}
void
pshader_hw_texreg2rgb
(
SHADER_OPCODE_ARG
*
arg
)
{
SHADER_BUFFER
*
buffer
=
arg
->
buffer
;
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
arg
->
shader
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
DWORD
flags
;
DWORD
reg1
=
arg
->
dst
&
WINED3DSP_REGNUM_MASK
;
char
dst_str
[
8
];
char
src_str
[
50
];
sprintf
(
dst_str
,
"T%u"
,
reg1
);
pshader_gen_input_modifier_line
(
buffer
,
arg
->
src
[
0
],
0
,
src_str
);
flags
=
reg1
<
MAX_TEXTURES
?
deviceImpl
->
stateBlock
->
textureState
[
reg1
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
:
0
;
shader_hw_sample
(
arg
,
reg1
,
dst_str
,
src_str
,
FALSE
,
FALSE
);
}
void
pshader_hw_texbem
(
SHADER_OPCODE_ARG
*
arg
)
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
arg
->
shader
;
...
...
dlls/wined3d/pixelshader.c
View file @
66447040
...
...
@@ -220,7 +220,7 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = {
{
WINED3DSIO_TEXBEML
,
"texbeml"
,
GLNAME_REQUIRE_GLSL
,
1
,
2
,
pshader_hw_texbem
,
pshader_glsl_texbem
,
WINED3DPS_VERSION
(
1
,
0
),
WINED3DPS_VERSION
(
1
,
3
)},
{
WINED3DSIO_TEXREG2AR
,
"texreg2ar"
,
"undefined"
,
1
,
2
,
pshader_hw_texreg2ar
,
pshader_glsl_texreg2ar
,
WINED3DPS_VERSION
(
1
,
0
),
WINED3DPS_VERSION
(
1
,
3
)},
{
WINED3DSIO_TEXREG2GB
,
"texreg2gb"
,
"undefined"
,
1
,
2
,
pshader_hw_texreg2gb
,
pshader_glsl_texreg2gb
,
WINED3DPS_VERSION
(
1
,
0
),
WINED3DPS_VERSION
(
1
,
3
)},
{
WINED3DSIO_TEXREG2RGB
,
"texreg2rgb"
,
GLNAME_REQUIRE_GLSL
,
1
,
2
,
NULL
,
pshader_glsl_texreg2rgb
,
WINED3DPS_VERSION
(
1
,
2
),
WINED3DPS_VERSION
(
1
,
3
)},
{
WINED3DSIO_TEXREG2RGB
,
"texreg2rgb"
,
"undefined"
,
1
,
2
,
pshader_hw_texreg2rgb
,
pshader_glsl_texreg2rgb
,
WINED3DPS_VERSION
(
1
,
2
),
WINED3DPS_VERSION
(
1
,
3
)},
{
WINED3DSIO_TEXM3x2PAD
,
"texm3x2pad"
,
"undefined"
,
1
,
2
,
pshader_hw_texm3x2pad
,
pshader_glsl_texm3x2pad
,
WINED3DPS_VERSION
(
1
,
0
),
WINED3DPS_VERSION
(
1
,
3
)},
{
WINED3DSIO_TEXM3x2TEX
,
"texm3x2tex"
,
"undefined"
,
1
,
2
,
pshader_hw_texm3x2tex
,
pshader_glsl_texm3x2tex
,
WINED3DPS_VERSION
(
1
,
0
),
WINED3DPS_VERSION
(
1
,
3
)},
{
WINED3DSIO_TEXM3x3PAD
,
"texm3x3pad"
,
"undefined"
,
1
,
2
,
pshader_hw_texm3x3pad
,
pshader_glsl_texm3x3pad
,
WINED3DPS_VERSION
(
1
,
0
),
WINED3DPS_VERSION
(
1
,
3
)},
...
...
dlls/wined3d/wined3d_private.h
View file @
66447040
...
...
@@ -1788,6 +1788,7 @@ extern void pshader_hw_texdp3(SHADER_OPCODE_ARG* arg);
extern
void
pshader_hw_texm3x3
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_hw_texm3x2depth
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_hw_dp2add
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_hw_texreg2rgb
(
SHADER_OPCODE_ARG
*
arg
);
/* ARB vertex / pixel shader common prototypes */
extern
void
shader_hw_nrm
(
SHADER_OPCODE_ARG
*
arg
);
...
...
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