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
fbee3cf2
Commit
fbee3cf2
authored
Mar 09, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename WINED3D_MAX_TEXTURES to WINED3D_MAX_FFP_TEXTURES.
parent
bcc8c31e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
90 additions
and
87 deletions
+90
-87
adapter_gl.c
dlls/wined3d/adapter_gl.c
+7
-7
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+23
-19
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+9
-9
context_gl.c
dlls/wined3d/context_gl.c
+7
-7
glsl_shader.c
dlls/wined3d/glsl_shader.c
+0
-0
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+1
-1
shader.c
dlls/wined3d/shader.c
+3
-3
state.c
dlls/wined3d/state.c
+4
-4
stateblock.c
dlls/wined3d/stateblock.c
+10
-10
utils.c
dlls/wined3d/utils.c
+11
-12
wined3d_private.h
dlls/wined3d/wined3d_private.h
+13
-13
wined3d.h
include/wine/wined3d.h
+2
-2
No files found.
dlls/wined3d/adapter_gl.c
View file @
fbee3cf2
...
...
@@ -2954,13 +2954,13 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
if
(
gl_info
->
supported
[
WINED3D_GL_LEGACY_CONTEXT
])
{
gl_info
->
gl_ops
.
gl
.
p_glGetIntegerv
(
GL_MAX_TEXTURE_UNITS_ARB
,
&
gl_max
);
gl_info
->
limits
.
textures
=
min
(
WINED3D_MAX_TEXTURES
,
gl_max
);
gl_info
->
limits
.
textures
=
min
(
WINED3D_MAX_
FFP_
TEXTURES
,
gl_max
);
TRACE
(
"Max textures: %d.
\n
"
,
gl_info
->
limits
.
textures
);
if
(
gl_info
->
supported
[
ARB_FRAGMENT_PROGRAM
])
{
gl_info
->
gl_ops
.
gl
.
p_glGetIntegerv
(
GL_MAX_TEXTURE_COORDS_ARB
,
&
gl_max
);
gl_info
->
limits
.
texture_coords
=
min
(
WINED3D_MAX_TEXTURES
,
gl_max
);
gl_info
->
limits
.
texture_coords
=
min
(
WINED3D_MAX_
FFP_
TEXTURES
,
gl_max
);
}
else
{
...
...
@@ -3000,7 +3000,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
* use any samplers. If fixed-function fragment processing is used
* we have to make sure that all vertex sampler setups are valid
* together with all possible fixed-function fragment processing
* setups. This is true if vsamplers + WINED3D_MAX_TEXTURES <= max_samplers.
* setups. This is true if vsamplers + WINED3D_MAX_
FFP_
TEXTURES <= max_samplers.
* This is true on all Direct3D 9 cards that support vertex
* texture fetch (GeForce 6 and GeForce 7 cards). Direct3D 9
* Radeon cards do not support vertex texture fetch. Direct3D 10
...
...
@@ -3012,13 +3012,13 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
* true. If not, write a warning and reduce the number of vertex
* samplers or probably disable vertex texture fetch. */
if
(
vertex_sampler_count
&&
gl_info
->
limits
.
combined_samplers
<
12
&&
WINED3D_MAX_TEXTURES
+
vertex_sampler_count
>
gl_info
->
limits
.
combined_samplers
)
&&
WINED3D_MAX_
FFP_
TEXTURES
+
vertex_sampler_count
>
gl_info
->
limits
.
combined_samplers
)
{
FIXME
(
"OpenGL implementation supports %u vertex samplers and %u total samplers.
\n
"
,
vertex_sampler_count
,
gl_info
->
limits
.
combined_samplers
);
FIXME
(
"Expected vertex samplers + WINED3D_MAX_TEXTURES(=8) > combined_samplers.
\n
"
);
if
(
gl_info
->
limits
.
combined_samplers
>
WINED3D_MAX_TEXTURES
)
vertex_sampler_count
=
gl_info
->
limits
.
combined_samplers
-
WINED3D_MAX_TEXTURES
;
FIXME
(
"Expected vertex samplers + WINED3D_MAX_
FFP_
TEXTURES(=8) > combined_samplers.
\n
"
);
if
(
gl_info
->
limits
.
combined_samplers
>
WINED3D_MAX_
FFP_
TEXTURES
)
vertex_sampler_count
=
gl_info
->
limits
.
combined_samplers
-
WINED3D_MAX_
FFP_
TEXTURES
;
else
vertex_sampler_count
=
0
;
gl_info
->
limits
.
samplers
[
WINED3D_SHADER_TYPE_VERTEX
]
=
vertex_sampler_count
;
...
...
dlls/wined3d/arb_program_shader.c
View file @
fbee3cf2
...
...
@@ -159,8 +159,8 @@ struct arb_ps_compiled_shader
{
struct
arb_ps_compile_args
args
;
struct
arb_ps_np2fixup_info
np2fixup_info
;
struct
stb_const_desc
bumpenvmatconst
[
WINED3D_MAX_TEXTURES
];
struct
stb_const_desc
luminanceconst
[
WINED3D_MAX_TEXTURES
];
struct
stb_const_desc
bumpenvmatconst
[
WINED3D_MAX_
FFP_
TEXTURES
];
struct
stb_const_desc
luminanceconst
[
WINED3D_MAX_
FFP_
TEXTURES
];
UINT
int_consts
[
WINED3D_MAX_CONSTS_I
];
GLuint
prgId
;
UINT
ycorrection
;
...
...
@@ -2013,7 +2013,7 @@ static void pshader_hw_tex(const struct wined3d_shader_instruction *ins)
if
(
shader_version
<
WINED3D_SHADER_VERSION
(
1
,
4
))
{
DWORD
flags
=
0
;
if
(
reg_sampler_code
<
WINED3D_MAX_TEXTURES
)
if
(
reg_sampler_code
<
WINED3D_MAX_
FFP_
TEXTURES
)
flags
=
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg_sampler_code
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
;
if
(
flags
&
WINED3D_PSARGS_PROJECTED
)
{
...
...
@@ -2086,7 +2086,7 @@ static void pshader_hw_texreg2ar(const struct wined3d_shader_instruction *ins)
/* Move .x first in case src_str is "TA" */
shader_addline
(
buffer
,
"MOV TA.y, %s.x;
\n
"
,
src_str
);
shader_addline
(
buffer
,
"MOV TA.x, %s.w;
\n
"
,
src_str
);
if
(
reg1
<
WINED3D_MAX_TEXTURES
)
if
(
reg1
<
WINED3D_MAX_
FFP_
TEXTURES
)
{
struct
shader_arb_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
flags
=
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg1
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
;
...
...
@@ -2197,7 +2197,7 @@ static void pshader_hw_texm3x2pad(const struct wined3d_shader_instruction *ins)
static
void
pshader_hw_texm3x2tex
(
const
struct
wined3d_shader_instruction
*
ins
)
{
struct
shader_arb_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
DWORD
flags
;
unsigned
int
flags
=
0
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
wined3d_string_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
char
dst_str
[
50
];
...
...
@@ -2211,7 +2211,8 @@ static void pshader_hw_texm3x2tex(const struct wined3d_shader_instruction *ins)
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
dst_str
);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
0
],
0
,
src0_name
);
shader_addline
(
buffer
,
"DP3 %s.y, fragment.texcoord[%u], %s;
\n
"
,
dst_reg
,
reg
,
src0_name
);
flags
=
reg
<
WINED3D_MAX_TEXTURES
?
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
:
0
;
if
(
reg
<
WINED3D_MAX_FFP_TEXTURES
)
flags
=
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
;
shader_hw_sample
(
ins
,
reg
,
dst_str
,
dst_reg
,
flags
&
WINED3D_PSARGS_PROJECTED
?
TEX_PROJ
:
0
,
NULL
,
NULL
);
}
...
...
@@ -2241,7 +2242,7 @@ static void pshader_hw_texm3x3tex(const struct wined3d_shader_instruction *ins)
{
struct
shader_arb_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
struct
wined3d_shader_tex_mx
*
tex_mx
=
ins
->
ctx
->
tex_mx
;
DWORD
flags
;
unsigned
int
flags
=
0
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
wined3d_string_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
char
dst_str
[
50
];
...
...
@@ -2254,7 +2255,8 @@ static void pshader_hw_texm3x3tex(const struct wined3d_shader_instruction *ins)
/* Sample the texture using the calculated coordinates */
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
dst_str
);
flags
=
reg
<
WINED3D_MAX_TEXTURES
?
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
:
0
;
if
(
reg
<
WINED3D_MAX_FFP_TEXTURES
)
flags
=
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
;
shader_hw_sample
(
ins
,
reg
,
dst_str
,
dst_name
,
flags
&
WINED3D_PSARGS_PROJECTED
?
TEX_PROJ
:
0
,
NULL
,
NULL
);
tex_mx
->
current_row
=
0
;
}
...
...
@@ -2263,7 +2265,7 @@ static void pshader_hw_texm3x3vspec(const struct wined3d_shader_instruction *ins
{
struct
shader_arb_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
struct
wined3d_shader_tex_mx
*
tex_mx
=
ins
->
ctx
->
tex_mx
;
DWORD
flags
;
unsigned
int
flags
=
0
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
wined3d_string_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
char
dst_str
[
50
];
...
...
@@ -2295,7 +2297,8 @@ static void pshader_hw_texm3x3vspec(const struct wined3d_shader_instruction *ins
/* Sample the texture using the calculated coordinates */
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
dst_str
);
flags
=
reg
<
WINED3D_MAX_TEXTURES
?
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
:
0
;
if
(
reg
<
WINED3D_MAX_FFP_TEXTURES
)
flags
=
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
;
shader_hw_sample
(
ins
,
reg
,
dst_str
,
dst_reg
,
flags
&
WINED3D_PSARGS_PROJECTED
?
TEX_PROJ
:
0
,
NULL
,
NULL
);
tex_mx
->
current_row
=
0
;
}
...
...
@@ -2304,7 +2307,7 @@ static void pshader_hw_texm3x3spec(const struct wined3d_shader_instruction *ins)
{
struct
shader_arb_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
struct
wined3d_shader_tex_mx
*
tex_mx
=
ins
->
ctx
->
tex_mx
;
DWORD
flags
;
unsigned
int
flags
=
0
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
wined3d_string_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
char
dst_str
[
50
];
...
...
@@ -2336,7 +2339,8 @@ static void pshader_hw_texm3x3spec(const struct wined3d_shader_instruction *ins)
/* Sample the texture using the calculated coordinates */
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
dst_str
);
flags
=
reg
<
WINED3D_MAX_TEXTURES
?
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
:
0
;
if
(
reg
<
WINED3D_MAX_FFP_TEXTURES
)
flags
=
priv
->
cur_ps_args
->
super
.
tex_transform
>>
reg
*
WINED3D_PSARGS_TEXTRANSFORM_SHIFT
;
shader_hw_sample
(
ins
,
reg
,
dst_str
,
dst_reg
,
flags
&
WINED3D_PSARGS_PROJECTED
?
TEX_PROJ
:
0
,
NULL
,
NULL
);
tex_mx
->
current_row
=
0
;
}
...
...
@@ -5791,8 +5795,8 @@ static void arbfp_get_caps(const struct wined3d_adapter *adapter, struct fragmen
/* TODO: Implement WINED3DTEXOPCAPS_PREMODULATE */
caps
->
MaxTextureBlendStages
=
WINED3D_MAX_TEXTURES
;
caps
->
MaxSimultaneousTextures
=
min
(
gl_info
->
limits
.
samplers
[
WINED3D_SHADER_TYPE_PIXEL
],
WINED3D_MAX_TEXTURES
);
caps
->
MaxTextureBlendStages
=
WINED3D_MAX_
FFP_
TEXTURES
;
caps
->
MaxSimultaneousTextures
=
min
(
gl_info
->
limits
.
samplers
[
WINED3D_SHADER_TYPE_PIXEL
],
WINED3D_MAX_
FFP_
TEXTURES
);
}
static
unsigned
int
arbfp_get_emul_mask
(
const
struct
wined3d_adapter
*
adapter
)
...
...
@@ -6271,7 +6275,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
}
/* Find out which textures are read */
for
(
stage
=
0
;
stage
<
WINED3D_MAX_TEXTURES
;
++
stage
)
for
(
stage
=
0
;
stage
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
stage
)
{
if
(
settings
->
op
[
stage
].
cop
==
WINED3D_TOP_DISABLE
)
break
;
...
...
@@ -6354,7 +6358,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
shader_addline
(
&
buffer
,
"TEMP arg0;
\n
"
);
shader_addline
(
&
buffer
,
"TEMP arg1;
\n
"
);
shader_addline
(
&
buffer
,
"TEMP arg2;
\n
"
);
for
(
stage
=
0
;
stage
<
WINED3D_MAX_TEXTURES
;
++
stage
)
for
(
stage
=
0
;
stage
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
stage
)
{
if
(
constant_used
&
(
1u
<<
stage
))
shader_addline
(
&
buffer
,
"PARAM const%u = program.env[%u];
\n
"
,
stage
,
ARB_FFP_CONST_CONSTANT
(
stage
));
...
...
@@ -6393,7 +6397,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
shader_addline
(
&
buffer
,
"MOV tempreg, 0.0;
\n
"
);
/* Generate texture sampling instructions */
for
(
stage
=
0
;
stage
<
WINED3D_MAX_TEXTURES
&&
settings
->
op
[
stage
].
cop
!=
WINED3D_TOP_DISABLE
;
++
stage
)
for
(
stage
=
0
;
stage
<
WINED3D_MAX_
FFP_
TEXTURES
&&
settings
->
op
[
stage
].
cop
!=
WINED3D_TOP_DISABLE
;
++
stage
)
{
if
(
!
(
tex_read
&
(
1u
<<
stage
)))
continue
;
...
...
@@ -6489,7 +6493,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
shader_addline
(
&
buffer
,
"MOV ret, fragment.color.primary;
\n
"
);
/* Generate the main shader */
for
(
stage
=
0
;
stage
<
WINED3D_MAX_TEXTURES
;
++
stage
)
for
(
stage
=
0
;
stage
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
stage
)
{
if
(
settings
->
op
[
stage
].
cop
==
WINED3D_TOP_DISABLE
)
break
;
...
...
@@ -6609,7 +6613,7 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi
{
/* Reload fixed function constants since they collide with the
* pixel shader constants. */
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
set_bumpmat_arbfp
(
context
,
state
,
STATE_TEXTURESTAGE
(
i
,
WINED3D_TSS_BUMPENV_MAT00
));
state_tss_constant_arbfp
(
context
,
state
,
STATE_TEXTURESTAGE
(
i
,
WINED3D_TSS_CONSTANT
));
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
fbee3cf2
...
...
@@ -50,7 +50,7 @@ struct atifs_ffp_desc
struct
ffp_frag_desc
parent
;
GLuint
shader
;
unsigned
int
num_textures_used
;
enum
atifs_constant_value
constants
[
WINED3D_MAX_TEXTURES
];
enum
atifs_constant_value
constants
[
WINED3D_MAX_
FFP_
TEXTURES
];
};
struct
atifs_private_data
...
...
@@ -320,15 +320,15 @@ static GLuint register_for_arg(unsigned int arg, const struct wined3d_gl_info *g
return
ret
;
}
static
GLuint
find_tmpreg
(
const
struct
texture_stage_op
op
[
WINED3D_MAX_TEXTURES
])
static
GLuint
find_tmpreg
(
const
struct
texture_stage_op
op
[
WINED3D_MAX_
FFP_
TEXTURES
])
{
int
lowest_read
=
-
1
;
int
lowest_write
=
-
1
;
int
i
;
BOOL
tex_used
[
WINED3D_MAX_TEXTURES
];
BOOL
tex_used
[
WINED3D_MAX_
FFP_
TEXTURES
];
memset
(
tex_used
,
0
,
sizeof
(
tex_used
));
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
if
(
op
[
i
].
cop
==
WINED3D_TOP_DISABLE
)
break
;
...
...
@@ -465,7 +465,7 @@ static BOOL op_reads_constant(const struct texture_stage_op *op)
||
(
op
->
aarg2
&
WINED3DTA_SELECTMASK
)
==
WINED3DTA_CONSTANT
;
}
static
GLuint
gen_ati_shader
(
const
struct
texture_stage_op
op
[
WINED3D_MAX_TEXTURES
],
static
GLuint
gen_ati_shader
(
const
struct
texture_stage_op
op
[
WINED3D_MAX_
FFP_
TEXTURES
],
const
struct
wined3d_gl_info
*
gl_info
,
enum
atifs_constant_value
*
constants
)
{
GLuint
ret
=
GL_EXTCALL
(
glGenFragmentShadersATI
(
1
));
...
...
@@ -602,7 +602,7 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[WINED3D_MAX_TEXTUR
}
/* Pass 4: Generate the arithmetic instructions */
for
(
stage
=
0
;
stage
<
WINED3D_MAX_TEXTURES
;
++
stage
)
for
(
stage
=
0
;
stage
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
stage
)
{
if
(
op
[
stage
].
cop
==
WINED3D_TOP_DISABLE
)
{
...
...
@@ -934,7 +934,7 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[WINED3D_MAX_TEXTUR
constants
[
ATIFS_CONST_TFACTOR
-
GL_CON_0_ATI
]
=
ATIFS_CONSTANT_TFACTOR
;
/* Assign unused constants to avoid reloading due to unused <-> bump matrix switches. */
for
(
stage
=
0
;
stage
<
WINED3D_MAX_TEXTURES
;
++
stage
)
for
(
stage
=
0
;
stage
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
stage
)
{
if
(
constants
[
stage
]
==
ATIFS_CONSTANT_UNUSED
)
constants
[
stage
]
=
ATIFS_CONSTANT_BUMP
;
...
...
@@ -1064,7 +1064,7 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined
GL_EXTCALL
(
glBindFragmentShaderATI
(
desc
->
shader
));
ctx_priv
->
last_shader
=
desc
;
for
(
i
=
0
;
i
<
WINED3D_MAX_
TEXTURES
;
i
++
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_TEXTURES
;
++
i
)
{
if
(
last_shader
&&
last_shader
->
constants
[
i
]
==
desc
->
constants
[
i
])
continue
;
...
...
@@ -1312,7 +1312,7 @@ static void atifs_get_caps(const struct wined3d_adapter *adapter, struct fragmen
* The proper fix for this is not to use GL_ATI_fragment_shader on cards newer than the
* r200 series and use an ARB or GLSL shader instead
*/
caps
->
MaxTextureBlendStages
=
WINED3D_MAX_TEXTURES
;
caps
->
MaxTextureBlendStages
=
WINED3D_MAX_
FFP_
TEXTURES
;
caps
->
MaxSimultaneousTextures
=
6
;
}
...
...
dlls/wined3d/context_gl.c
View file @
fbee3cf2
...
...
@@ -2396,7 +2396,7 @@ const unsigned int *wined3d_context_gl_get_tex_unit_mapping(const struct wined3d
if
(
!
shader_version
)
{
*
base
=
0
;
*
count
=
WINED3D_MAX_TEXTURES
;
*
count
=
WINED3D_MAX_
FFP_
TEXTURES
;
return
context_gl
->
tex_unit_map
;
}
...
...
@@ -3271,7 +3271,7 @@ void wined3d_context_gl_apply_blit_state(struct wined3d_context_gl *context_gl,
sampler
=
context_gl
->
rev_tex_unit_map
[
0
];
if
(
sampler
!=
WINED3D_UNMAPPED_STAGE
)
{
if
(
sampler
<
WINED3D_MAX_TEXTURES
)
if
(
sampler
<
WINED3D_MAX_
FFP_
TEXTURES
)
{
context_invalidate_state
(
context
,
STATE_TRANSFORM
(
WINED3D_TS_TEXTURE0
+
sampler
));
context_invalidate_state
(
context
,
STATE_TEXTURESTAGE
(
sampler
,
WINED3D_TSS_COLOR_OP
));
...
...
@@ -3389,7 +3389,7 @@ void wined3d_context_gl_apply_ffp_blit_state(struct wined3d_context_gl *context_
sampler
=
context_gl
->
rev_tex_unit_map
[
i
];
if
(
sampler
!=
WINED3D_UNMAPPED_STAGE
)
{
if
(
sampler
<
WINED3D_MAX_TEXTURES
)
if
(
sampler
<
WINED3D_MAX_
FFP_
TEXTURES
)
context_invalidate_state
(
context
,
STATE_TEXTURESTAGE
(
sampler
,
WINED3D_TSS_COLOR_OP
));
context_invalidate_state
(
context
,
STATE_SAMPLER
(
sampler
));
}
...
...
@@ -3741,7 +3741,7 @@ static void context_update_fixed_function_usage_map(struct wined3d_context *cont
UINT
i
,
start
,
end
;
context
->
fixed_function_usage_map
=
0
;
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
enum
wined3d_texture_op
color_op
=
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_OP
];
enum
wined3d_texture_op
alpha_op
=
state
->
texture_states
[
i
][
WINED3D_TSS_ALPHA_OP
];
...
...
@@ -3767,7 +3767,7 @@ static void context_update_fixed_function_usage_map(struct wined3d_context *cont
context
->
fixed_function_usage_map
|=
(
1u
<<
i
);
if
((
color_op
==
WINED3D_TOP_BUMPENVMAP
||
color_op
==
WINED3D_TOP_BUMPENVMAP_LUMINANCE
)
&&
i
<
WINED3D_MAX_TEXTURES
-
1
)
&&
i
<
WINED3D_MAX_
FFP_
TEXTURES
-
1
)
context
->
fixed_function_usage_map
|=
(
1u
<<
(
i
+
1
));
}
...
...
@@ -3865,7 +3865,7 @@ static BOOL wined3d_context_gl_unit_free_for_vs(const struct wined3d_context_gl
if
(
!
ps_resource_info
)
{
/* No pixel shader, check fixed function */
return
current_mapping
>=
WINED3D_MAX_TEXTURES
return
current_mapping
>=
WINED3D_MAX_
FFP_
TEXTURES
||
!
(
context_gl
->
c
.
fixed_function_usage_map
&
(
1u
<<
current_mapping
));
}
...
...
@@ -5376,7 +5376,7 @@ void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context
continue
;
}
if
(
coord_idx
<
WINED3D_MAX_TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
))))
if
(
coord_idx
<
WINED3D_MAX_
FFP_
TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
))))
{
const
struct
wined3d_stream_info_element
*
e
=
&
si
->
elements
[
WINED3D_FFP_TEXCOORD0
+
coord_idx
];
...
...
dlls/wined3d/glsl_shader.c
View file @
fbee3cf2
This diff is collapsed.
Click to expand it.
dlls/wined3d/nvidia_texture_shader.c
View file @
fbee3cf2
...
...
@@ -747,7 +747,7 @@ static void nvrc_fragment_get_caps(const struct wined3d_adapter *adapter, struct
WINED3DTEXOPCAPS_PREMODULATE */
#endif
caps
->
MaxTextureBlendStages
=
min
(
WINED3D_MAX_TEXTURES
,
gl_info
->
limits
.
general_combiners
);
caps
->
MaxTextureBlendStages
=
min
(
WINED3D_MAX_
FFP_
TEXTURES
,
gl_info
->
limits
.
general_combiners
);
caps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
}
...
...
dlls/wined3d/shader.c
View file @
fbee3cf2
...
...
@@ -2999,7 +2999,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
const
struct
wined3d_shader
*
vs
=
state
->
shader
[
WINED3D_SHADER_TYPE_VERTEX
];
args
->
texcoords_initialized
=
0
;
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
if
(
vs
)
{
...
...
@@ -3013,14 +3013,14 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
if
((
state
->
texture_states
[
i
][
WINED3D_TSS_TEXCOORD_INDEX
]
>>
WINED3D_FFP_TCI_SHIFT
)
&
WINED3D_FFP_TCI_MASK
||
(
coord_idx
<
WINED3D_MAX_TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
)))))
||
(
coord_idx
<
WINED3D_MAX_
FFP_
TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
)))))
args
->
texcoords_initialized
|=
1u
<<
i
;
}
}
}
else
{
args
->
texcoords_initialized
=
wined3d_mask_from_size
(
WINED3D_MAX_TEXTURES
);
args
->
texcoords_initialized
=
wined3d_mask_from_size
(
WINED3D_MAX_
FFP_
TEXTURES
);
}
args
->
pointsprite
=
state
->
render_states
[
WINED3D_RS_POINTSPRITEENABLE
]
...
...
dlls/wined3d/state.c
View file @
fbee3cf2
...
...
@@ -3435,7 +3435,7 @@ static void sampler_texmatrix(struct wined3d_context *context, const struct wine
* wined3d_texture_apply_state_changes() multiplies the set matrix with a fixup matrix. Before the
* scaling is reapplied or removed, the texture matrix has to be reapplied.
*/
if
(
sampler
<
WINED3D_MAX_TEXTURES
)
if
(
sampler
<
WINED3D_MAX_
FFP_
TEXTURES
)
{
const
BOOL
tex_is_pow2
=
!
(
texture
->
flags
&
WINED3D_TEXTURE_POW2_MAT_IDENT
);
...
...
@@ -3927,7 +3927,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
if
(
!
isStateDirty
(
context
,
STATE_TRANSFORM
(
WINED3D_TS_TEXTURE0
+
i
)))
transform_texture
(
context
,
state
,
STATE_TEXTURESTAGE
(
i
,
WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS
));
...
...
@@ -5304,7 +5304,7 @@ static void prune_invalid_states(struct wined3d_state_entry *state_table, const
unsigned
int
start
,
last
,
i
;
start
=
STATE_TEXTURESTAGE
(
d3d_info
->
limits
.
ffp_blend_stages
,
0
);
last
=
STATE_TEXTURESTAGE
(
WINED3D_MAX_TEXTURES
-
1
,
WINED3D_HIGHEST_TEXTURE_STATE
);
last
=
STATE_TEXTURESTAGE
(
WINED3D_MAX_
FFP_
TEXTURES
-
1
,
WINED3D_HIGHEST_TEXTURE_STATE
);
for
(
i
=
start
;
i
<=
last
;
++
i
)
{
state_table
[
i
].
representative
=
0
;
...
...
@@ -5312,7 +5312,7 @@ static void prune_invalid_states(struct wined3d_state_entry *state_table, const
}
start
=
STATE_TRANSFORM
(
WINED3D_TS_TEXTURE0
+
d3d_info
->
limits
.
ffp_blend_stages
);
last
=
STATE_TRANSFORM
(
WINED3D_TS_TEXTURE0
+
WINED3D_MAX_TEXTURES
-
1
);
last
=
STATE_TRANSFORM
(
WINED3D_TS_TEXTURE0
+
WINED3D_MAX_
FFP_
TEXTURES
-
1
);
for
(
i
=
start
;
i
<=
last
;
++
i
)
{
state_table
[
i
].
representative
=
0
;
...
...
dlls/wined3d/stateblock.c
View file @
fbee3cf2
...
...
@@ -40,7 +40,7 @@ struct wined3d_saved_states
uint16_t
streamSource
;
/* WINED3D_MAX_STREAMS, 16 */
uint16_t
streamFreq
;
/* WINED3D_MAX_STREAMS, 16 */
uint32_t
renderState
[
WINED3D_BITMAP_SIZE
(
WINEHIGHEST_RENDER_STATE
+
1
)];
uint32_t
textureState
[
WINED3D_MAX_
TEXTURES
];
/* WINED3D_HIGHEST_TEXTURE_STATE + 1, 18 */
uint32_t
textureState
[
WINED3D_MAX_
FFP_TEXTURES
];
/* WINED3D_HIGHEST_TEXTURE_STATE + 1, 18 */
uint16_t
samplerState
[
WINED3D_MAX_COMBINED_SAMPLERS
];
/* WINED3D_HIGHEST_SAMPLER_STATE + 1, 14 */
uint32_t
clipplane
;
/* WINED3D_MAX_CLIP_DISTANCES, 8 */
uint32_t
textures
:
20
;
/* WINED3D_MAX_COMBINED_SAMPLERS, 20 */
...
...
@@ -79,7 +79,7 @@ struct wined3d_stateblock
unsigned
int
num_contained_render_states
;
unsigned
int
contained_transform_states
[
WINED3D_HIGHEST_TRANSFORM_STATE
+
1
];
unsigned
int
num_contained_transform_states
;
struct
stage_state
contained_tss_states
[
WINED3D_MAX_TEXTURES
*
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
)];
struct
stage_state
contained_tss_states
[
WINED3D_MAX_
FFP_
TEXTURES
*
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
)];
unsigned
int
num_contained_tss_states
;
struct
stage_state
contained_sampler_states
[
WINED3D_MAX_COMBINED_SAMPLERS
*
WINED3D_HIGHEST_SAMPLER_STATE
];
unsigned
int
num_contained_sampler_states
;
...
...
@@ -274,7 +274,7 @@ static void stateblock_savedstates_set_all(struct wined3d_saved_states *states,
states
->
textures
=
0xfffff
;
stateblock_set_all_bits
(
states
->
transform
,
WINED3D_HIGHEST_TRANSFORM_STATE
+
1
);
stateblock_set_all_bits
(
states
->
renderState
,
WINEHIGHEST_RENDER_STATE
+
1
);
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
states
->
textureState
[
i
]
=
0x3ffff
;
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
states
->
textureState
[
i
]
=
0x3ffff
;
for
(
i
=
0
;
i
<
WINED3D_MAX_COMBINED_SAMPLERS
;
++
i
)
states
->
samplerState
[
i
]
=
0x3ffe
;
states
->
clipplane
=
wined3d_mask_from_size
(
WINED3D_MAX_CLIP_DISTANCES
);
states
->
pixelShaderConstantsB
=
0xffff
;
...
...
@@ -302,7 +302,7 @@ static void stateblock_savedstates_set_pixel(struct wined3d_saved_states *states
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
pixel_states_texture
);
++
i
)
texture_mask
|=
1u
<<
pixel_states_texture
[
i
];
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
states
->
textureState
[
i
]
=
texture_mask
;
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
states
->
textureState
[
i
]
=
texture_mask
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
pixel_states_sampler
);
++
i
)
sampler_mask
|=
1u
<<
pixel_states_sampler
[
i
];
for
(
i
=
0
;
i
<
WINED3D_MAX_COMBINED_SAMPLERS
;
++
i
)
states
->
samplerState
[
i
]
=
sampler_mask
;
...
...
@@ -331,7 +331,7 @@ static void stateblock_savedstates_set_vertex(struct wined3d_saved_states *state
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
vertex_states_texture
);
++
i
)
texture_mask
|=
1u
<<
vertex_states_texture
[
i
];
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
states
->
textureState
[
i
]
=
texture_mask
;
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
states
->
textureState
[
i
]
=
texture_mask
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
vertex_states_sampler
);
++
i
)
sampler_mask
|=
1u
<<
vertex_states_sampler
[
i
];
for
(
i
=
0
;
i
<
WINED3D_MAX_COMBINED_SAMPLERS
;
++
i
)
states
->
samplerState
[
i
]
=
sampler_mask
;
...
...
@@ -369,7 +369,7 @@ void CDECL wined3d_stateblock_init_contained_states(struct wined3d_stateblock *s
}
}
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
DWORD
map
=
stateblock
->
changed
.
textureState
[
i
];
...
...
@@ -1519,10 +1519,10 @@ void CDECL wined3d_stateblock_set_texture_stage_state(struct wined3d_stateblock
return
;
}
if
(
stage
>=
WINED3D_MAX_TEXTURES
)
if
(
stage
>=
WINED3D_MAX_
FFP_
TEXTURES
)
{
WARN
(
"Attempting to set stage %u which is higher than the max stage %u, ignoring.
\n
"
,
stage
,
WINED3D_MAX_TEXTURES
-
1
);
stage
,
WINED3D_MAX_
FFP_
TEXTURES
-
1
);
return
;
}
...
...
@@ -1990,7 +1990,7 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
init_default_render_states
(
state
->
render_states
,
d3d_info
);
/* Texture Stage States - Put directly into state block, we will call function below */
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
TRACE
(
"Setting up default texture states for texture Stage %u.
\n
"
,
i
);
state
->
transforms
[
WINED3D_TS_TEXTURE0
+
i
]
=
identity
;
...
...
@@ -2110,7 +2110,7 @@ static void stateblock_state_init_default(struct wined3d_stateblock_state *state
init_default_render_states
(
state
->
rs
,
d3d_info
);
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
state
->
transforms
[
WINED3D_TS_TEXTURE0
+
i
]
=
identity
;
init_default_texture_state
(
i
,
state
->
texture_states
[
i
]);
...
...
dlls/wined3d/utils.c
View file @
fbee3cf2
...
...
@@ -5854,7 +5854,7 @@ void get_texture_matrix(const struct wined3d_context *context, const struct wine
BOOL
generated
=
(
state
->
texture_states
[
tex
][
WINED3D_TSS_TEXCOORD_INDEX
]
&
0xffff0000
)
!=
WINED3DTSS_TCI_PASSTHRU
;
unsigned
int
coord_idx
=
min
(
state
->
texture_states
[
tex
][
WINED3D_TSS_TEXCOORD_INDEX
&
0x0000ffff
],
WINED3D_MAX_TEXTURES
-
1
);
WINED3D_MAX_
FFP_
TEXTURES
-
1
);
compute_texture_matrix
(
&
state
->
transforms
[
WINED3D_TS_TEXTURE0
+
tex
],
state
->
texture_states
[
tex
][
WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS
],
...
...
@@ -6573,9 +6573,8 @@ void wined3d_ffp_get_fs_settings(const struct wined3d_context *context, const st
}
/* Clear unsupported stages */
for
(;
i
<
WINED3D_MAX_TEXTURES
;
i
++
)
{
for
(;
i
<
WINED3D_MAX_FFP_TEXTURES
;
++
i
)
memset
(
&
settings
->
op
[
i
],
0xff
,
sizeof
(
settings
->
op
[
i
]));
}
if
(
!
state
->
render_states
[
WINED3D_RS_FOGENABLE
])
{
...
...
@@ -6649,7 +6648,7 @@ void wined3d_ffp_get_fs_settings(const struct wined3d_context *context, const st
if
(
d3d_info
->
limits
.
varying_count
&&
!
d3d_info
->
full_ffp_varyings
)
{
settings
->
texcoords_initialized
=
0
;
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
if
(
use_vs
(
state
))
{
...
...
@@ -6662,14 +6661,14 @@ void wined3d_ffp_get_fs_settings(const struct wined3d_context *context, const st
unsigned
int
coord_idx
=
state
->
texture_states
[
i
][
WINED3D_TSS_TEXCOORD_INDEX
];
if
((
state
->
texture_states
[
i
][
WINED3D_TSS_TEXCOORD_INDEX
]
>>
WINED3D_FFP_TCI_SHIFT
)
&
WINED3D_FFP_TCI_MASK
||
(
coord_idx
<
WINED3D_MAX_TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
)))))
||
(
coord_idx
<
WINED3D_MAX_
FFP_
TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
)))))
settings
->
texcoords_initialized
|=
1u
<<
i
;
}
}
}
else
{
settings
->
texcoords_initialized
=
wined3d_mask_from_size
(
WINED3D_MAX_TEXTURES
);
settings
->
texcoords_initialized
=
wined3d_mask_from_size
(
WINED3D_MAX_
FFP_
TEXTURES
);
}
settings
->
pointsprite
=
state
->
render_states
[
WINED3D_RS_POINTSPRITEENABLE
]
...
...
@@ -6846,15 +6845,15 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
else
settings
->
fog_mode
=
WINED3D_FFP_VS_FOG_FOGCOORD
;
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
coord_idx
=
state
->
texture_states
[
i
][
WINED3D_TSS_TEXCOORD_INDEX
];
if
(
coord_idx
<
WINED3D_MAX_TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
))))
if
(
coord_idx
<
WINED3D_MAX_
FFP_
TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
))))
settings
->
texcoords
|=
1u
<<
i
;
settings
->
texgen
[
i
]
=
state
->
texture_states
[
i
][
WINED3D_TSS_TEXCOORD_INDEX
];
}
if
(
d3d_info
->
full_ffp_varyings
)
settings
->
texcoords
=
wined3d_mask_from_size
(
WINED3D_MAX_TEXTURES
);
settings
->
texcoords
=
wined3d_mask_from_size
(
WINED3D_MAX_
FFP_
TEXTURES
);
if
(
d3d_info
->
emulated_flatshading
)
settings
->
flatshading
=
state
->
render_states
[
WINED3D_RS_SHADEMODE
]
==
WINED3D_SHADE_FLAT
;
...
...
@@ -6895,15 +6894,15 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
settings
->
ambient_source
=
ambient_source
;
settings
->
specular_source
=
specular_source
;
for
(
i
=
0
;
i
<
WINED3D_MAX_TEXTURES
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_
FFP_
TEXTURES
;
++
i
)
{
coord_idx
=
state
->
texture_states
[
i
][
WINED3D_TSS_TEXCOORD_INDEX
];
if
(
coord_idx
<
WINED3D_MAX_TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
))))
if
(
coord_idx
<
WINED3D_MAX_
FFP_
TEXTURES
&&
(
si
->
use_map
&
(
1u
<<
(
WINED3D_FFP_TEXCOORD0
+
coord_idx
))))
settings
->
texcoords
|=
1u
<<
i
;
settings
->
texgen
[
i
]
=
state
->
texture_states
[
i
][
WINED3D_TSS_TEXCOORD_INDEX
];
}
if
(
d3d_info
->
full_ffp_varyings
)
settings
->
texcoords
=
wined3d_mask_from_size
(
WINED3D_MAX_TEXTURES
);
settings
->
texcoords
=
wined3d_mask_from_size
(
WINED3D_MAX_
FFP_
TEXTURES
);
for
(
i
=
0
;
i
<
WINED3D_MAX_ACTIVE_LIGHTS
;
++
i
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
fbee3cf2
...
...
@@ -1120,8 +1120,8 @@ struct wined3d_shader_reg_maps
uint32_t
resource_map
[
WINED3D_BITMAP_SIZE
(
MAX_SHADER_RESOURCE_VIEWS
)];
struct
wined3d_shader_sampler_map
sampler_map
;
DWORD
sampler_comparison_mode
;
BYTE
bumpmat
;
/* WINED3D_MAX_TEXTURES, 8 */
BYTE
luminanceparams
;
/* WINED3D_MAX_TEXTURES, 8 */
BYTE
bumpmat
;
/* WINED3D_MAX_
FFP_
TEXTURES, 8 */
BYTE
luminanceparams
;
/* WINED3D_MAX_
FFP_
TEXTURES, 8 */
struct
wined3d_shader_resource_info
uav_resource_info
[
MAX_UNORDERED_ACCESS_VIEWS
];
DWORD
uav_read_mask
:
8
;
/* MAX_UNORDERED_ACCESS_VIEWS, 8 */
DWORD
uav_counter_mask
:
8
;
/* MAX_UNORDERED_ACCESS_VIEWS, 8 */
...
...
@@ -1477,7 +1477,7 @@ struct ps_compile_args
in D3D10 (unconditional NP2 support mandatory). */
WORD
np2_fixup
;
WORD
shadow
;
/* WINED3D_MAX_FRAGMENT_SAMPLERS, 16 */
WORD
texcoords_initialized
;
/* WINED3D_MAX_TEXTURES, 8 */
WORD
texcoords_initialized
;
/* WINED3D_MAX_
FFP_
TEXTURES, 8 */
WORD
padding_to_dword
;
DWORD
pointsprite
:
1
;
DWORD
flatshading
:
1
;
...
...
@@ -1725,10 +1725,10 @@ void dispatch_compute(struct wined3d_device *device, const struct wined3d_state
#define STATE_TEXTURESTAGE(stage, num) \
(STATE_RENDER(WINEHIGHEST_RENDER_STATE) + 1 + (stage) * (WINED3D_HIGHEST_TEXTURE_STATE + 1) + (num))
#define STATE_IS_TEXTURESTAGE(a) \
((a) >= STATE_TEXTURESTAGE(0, 1) && (a) <= STATE_TEXTURESTAGE(WINED3D_MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE))
((a) >= STATE_TEXTURESTAGE(0, 1) && (a) <= STATE_TEXTURESTAGE(WINED3D_MAX_
FFP_
TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE))
/* + 1 because samplers start with 0 */
#define STATE_SAMPLER(num) (STATE_TEXTURESTAGE(WINED3D_MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE) + 1 + (num))
#define STATE_SAMPLER(num) (STATE_TEXTURESTAGE(WINED3D_MAX_
FFP_
TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE) + 1 + (num))
#define STATE_IS_SAMPLER(num) ((num) >= STATE_SAMPLER(0) && (num) <= STATE_SAMPLER(WINED3D_MAX_COMBINED_SAMPLERS - 1))
#define STATE_GRAPHICS_SHADER(a) (STATE_SAMPLER(WINED3D_MAX_COMBINED_SAMPLERS) + (a))
...
...
@@ -1931,11 +1931,11 @@ struct wined3d_context
DWORD
last_was_blit
:
1
;
DWORD
last_was_ckey
:
1
;
DWORD
last_was_dual_source_blend
:
1
;
DWORD
texShaderBumpMap
:
8
;
/* WINED3D_MAX_TEXTURES, 8 */
DWORD
lowest_disabled_stage
:
4
;
/* Max WINED3D_MAX_TEXTURES, 8 */
DWORD
texShaderBumpMap
:
8
;
/* WINED3D_MAX_
FFP_
TEXTURES, 8 */
DWORD
lowest_disabled_stage
:
4
;
/* Max WINED3D_MAX_
FFP_
TEXTURES, 8 */
DWORD
lastWasPow2Texture
:
8
;
/* WINED3D_MAX_TEXTURES, 8 */
DWORD
fixed_function_usage_map
:
8
;
/* WINED3D_MAX_TEXTURES, 8 */
DWORD
lastWasPow2Texture
:
8
;
/* WINED3D_MAX_
FFP_
TEXTURES, 8 */
DWORD
fixed_function_usage_map
:
8
;
/* WINED3D_MAX_
FFP_
TEXTURES, 8 */
DWORD
use_immediate_mode_draw
:
1
;
DWORD
uses_uavs
:
1
;
DWORD
uses_fbo_attached_resources
:
1
;
...
...
@@ -2695,7 +2695,7 @@ struct texture_stage_op
struct
ffp_frag_settings
{
struct
texture_stage_op
op
[
WINED3D_MAX_TEXTURES
];
struct
texture_stage_op
op
[
WINED3D_MAX_
FFP_
TEXTURES
];
enum
wined3d_ffp_ps_fog_mode
fog
;
unsigned
char
sRGB_write
;
unsigned
char
emul_clipplanes
;
...
...
@@ -2760,14 +2760,14 @@ struct wined3d_ffp_vs_settings
DWORD
point_size
:
1
;
DWORD
per_vertex_point_size
:
1
;
DWORD
fog_mode
:
2
;
DWORD
texcoords
:
8
;
/* WINED3D_MAX_TEXTURES */
DWORD
texcoords
:
8
;
/* WINED3D_MAX_
FFP_
TEXTURES */
DWORD
ortho_fog
:
1
;
DWORD
flatshading
:
1
;
DWORD
padding
:
18
;
DWORD
swizzle_map
;
/* MAX_ATTRIBS, 32 */
unsigned
int
texgen
[
WINED3D_MAX_TEXTURES
];
unsigned
int
texgen
[
WINED3D_MAX_
FFP_
TEXTURES
];
};
struct
wined3d_ffp_vs_desc
...
...
@@ -2889,7 +2889,7 @@ struct wined3d_state
struct
wined3d_texture
*
textures
[
WINED3D_MAX_COMBINED_SAMPLERS
];
uint32_t
sampler_states
[
WINED3D_MAX_COMBINED_SAMPLERS
][
WINED3D_HIGHEST_SAMPLER_STATE
+
1
];
uint32_t
texture_states
[
WINED3D_MAX_TEXTURES
][
WINED3D_HIGHEST_TEXTURE_STATE
+
1
];
uint32_t
texture_states
[
WINED3D_MAX_
FFP_
TEXTURES
][
WINED3D_HIGHEST_TEXTURE_STATE
+
1
];
struct
wined3d_matrix
transforms
[
WINED3D_HIGHEST_TRANSFORM_STATE
+
1
];
struct
wined3d_vec4
clip_planes
[
WINED3D_MAX_CLIP_DISTANCES
];
...
...
include/wine/wined3d.h
View file @
fbee3cf2
...
...
@@ -1590,7 +1590,7 @@ enum wined3d_memory_segment_group
#define WINED3D_REGISTER_WINDOW_NO_PRINT_SCREEN 0x00000004u
#define WINED3D_MAX_STREAMS 16
#define WINED3D_MAX_
TEXTURES
8
#define WINED3D_MAX_
FFP_TEXTURES
8
#define WINED3D_MAX_FRAGMENT_SAMPLERS 16
#define WINED3D_MAX_VERTEX_SAMPLERS 4
#define WINED3D_MAX_COMBINED_SAMPLERS (WINED3D_MAX_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS)
...
...
@@ -2182,7 +2182,7 @@ struct wined3d_stateblock_state
struct
wined3d_texture
*
textures
[
WINED3D_MAX_COMBINED_SAMPLERS
];
uint32_t
sampler_states
[
WINED3D_MAX_COMBINED_SAMPLERS
][
WINED3D_HIGHEST_SAMPLER_STATE
+
1
];
uint32_t
texture_states
[
WINED3D_MAX_TEXTURES
][
WINED3D_HIGHEST_TEXTURE_STATE
+
1
];
uint32_t
texture_states
[
WINED3D_MAX_
FFP_
TEXTURES
][
WINED3D_HIGHEST_TEXTURE_STATE
+
1
];
struct
wined3d_matrix
transforms
[
WINED3D_HIGHEST_TRANSFORM_STATE
+
1
];
struct
wined3d_vec4
clip_planes
[
WINED3D_MAX_CLIP_DISTANCES
];
...
...
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