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
ae600fe0
Commit
ae600fe0
authored
May 29, 2009
by
Stefan Doesinger
Committed by
Alexandre Julliard
Jun 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement texldl in ARB.
parent
60317d02
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
4 deletions
+35
-4
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+30
-3
baseshader.c
dlls/wined3d/baseshader.c
+4
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
ae600fe0
...
...
@@ -951,6 +951,12 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD
shader_addline
(
buffer
,
"TXD %s, %s, %s, %s, texture[%u], %s;
\n
"
,
dst_str
,
coord_reg
,
dsx
,
dsy
,
sampler_idx
,
tex_type
);
}
else
if
(
flags
&
TEX_LOD
)
{
if
(
flags
&
TEX_PROJ
)
FIXME
(
"Projected texture sampling with explicit lod
\n
"
);
if
(
flags
&
TEX_BIAS
)
FIXME
(
"Biased texture sampling with explicit lod
\n
"
);
shader_addline
(
buffer
,
"TXL %s, %s, texture[%u], %s;
\n
"
,
dst_str
,
coord_reg
,
sampler_idx
,
tex_type
);
}
else
if
(
flags
&
TEX_BIAS
)
{
/* Shouldn't be possible, but let's check for it */
...
...
@@ -2399,6 +2405,22 @@ static void shader_hw_texldd(const struct wined3d_shader_instruction *ins)
shader_hw_sample
(
ins
,
sampler_idx
,
reg_dest
,
reg_src
[
0
],
flags
,
reg_src
[
1
],
reg_src
[
2
]);
}
static
void
shader_hw_texldl
(
const
struct
wined3d_shader_instruction
*
ins
)
{
DWORD
sampler_idx
=
ins
->
src
[
1
].
reg
.
idx
;
char
reg_dest
[
40
];
char
reg_coord
[
40
];
DWORD
flags
=
TEX_LOD
;
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
reg_dest
);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
0
],
0
,
reg_coord
);
if
(
ins
->
flags
&
WINED3DSI_TEXLD_PROJECT
)
flags
|=
TEX_PROJ
;
if
(
ins
->
flags
&
WINED3DSI_TEXLD_BIAS
)
flags
|=
TEX_BIAS
;
shader_hw_sample
(
ins
,
sampler_idx
,
reg_dest
,
reg_coord
,
flags
,
NULL
,
NULL
);
}
static
GLuint
create_arb_blt_vertex_program
(
const
WineD3D_GL_Info
*
gl_info
)
{
GLuint
program_id
=
0
;
...
...
@@ -2603,7 +2625,8 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
* Testing shows no performance difference between OPTION NV_fragment_program2 and NV_fragment_program.
* So enable the best we can get.
*/
if
(
reg_maps
->
usesdsx
||
reg_maps
->
usesdsy
||
reg_maps
->
loop_depth
>
0
||
reg_maps
->
usestexldd
)
if
(
reg_maps
->
usesdsx
||
reg_maps
->
usesdsy
||
reg_maps
->
loop_depth
>
0
||
reg_maps
->
usestexldd
||
reg_maps
->
usestexldl
)
{
want_nv_prog
=
TRUE
;
}
...
...
@@ -2810,7 +2833,11 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This,
/* Always enable the NV extension if available. Unlike fragment shaders, there is no
* mesurable performance penalty, and we can always make use of it for clipplanes.
*/
if
(
GL_SUPPORT
(
NV_VERTEX_PROGRAM2_OPTION
))
{
if
(
GL_SUPPORT
(
NV_VERTEX_PROGRAM3
))
{
shader_addline
(
buffer
,
"OPTION NV_vertex_program3;
\n
"
);
priv_ctx
.
target_version
=
NV3
;
shader_addline
(
buffer
,
"ADDRESS aL;
\n
"
);
}
else
if
(
GL_SUPPORT
(
NV_VERTEX_PROGRAM2_OPTION
))
{
shader_addline
(
buffer
,
"OPTION NV_vertex_program2;
\n
"
);
priv_ctx
.
target_version
=
NV2
;
shader_addline
(
buffer
,
"ADDRESS aL;
\n
"
);
...
...
@@ -3492,7 +3519,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_TEXDP3TEX */
pshader_hw_texdp3tex
,
/* WINED3DSIH_TEXKILL */
pshader_hw_texkill
,
/* WINED3DSIH_TEXLDD */
shader_hw_texldd
,
/* WINED3DSIH_TEXLDL */
NULL
,
/* WINED3DSIH_TEXLDL */
shader_hw_texldl
,
/* WINED3DSIH_TEXM3x2DEPTH */
pshader_hw_texm3x2depth
,
/* WINED3DSIH_TEXM3x2PAD */
pshader_hw_texm3x2pad
,
/* WINED3DSIH_TEXM3x2TEX */
pshader_hw_texm3x2tex
,
...
...
dlls/wined3d/baseshader.c
View file @
ae600fe0
...
...
@@ -692,6 +692,10 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
{
reg_maps
->
usestexldd
=
1
;
}
else
if
(
ins
.
handler_idx
==
WINED3DSIH_TEXLDL
)
{
reg_maps
->
usestexldl
=
1
;
}
else
if
(
ins
.
handler_idx
==
WINED3DSIH_MOVA
)
{
reg_maps
->
usesmova
=
1
;
...
...
dlls/wined3d/wined3d_private.h
View file @
ae600fe0
...
...
@@ -629,7 +629,7 @@ typedef struct shader_reg_maps
WINED3DSAMPLER_TEXTURE_TYPE
sampler_type
[
max
(
MAX_FRAGMENT_SAMPLERS
,
MAX_VERTEX_SAMPLERS
)];
BOOL
bumpmat
[
MAX_TEXTURES
],
luminanceparams
[
MAX_TEXTURES
];
char
usesnrm
,
vpos
,
usesdsx
,
usesdsy
,
usestexldd
,
usesmova
;
char
usesnrm
,
vpos
,
usesdsx
,
usesdsy
,
usestexldd
,
usesmova
,
usestexldl
;
char
usesrelconstF
;
/* Whether or not loops are used in this shader, and nesting depth */
...
...
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