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
15140e76
Commit
15140e76
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 the "textures" field of struct wined3d_gl_limits to "ffp_textures".
parent
fbee3cf2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
25 deletions
+25
-25
adapter_gl.c
dlls/wined3d/adapter_gl.c
+6
-6
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+3
-3
context_gl.c
dlls/wined3d/context_gl.c
+4
-4
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+5
-5
state.c
dlls/wined3d/state.c
+5
-5
utils.c
dlls/wined3d/utils.c
+1
-1
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+1
-1
No files found.
dlls/wined3d/adapter_gl.c
View file @
15140e76
...
...
@@ -2890,7 +2890,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
GLint
gl_max
;
gl_info
->
limits
.
buffers
=
1
;
gl_info
->
limits
.
textures
=
0
;
gl_info
->
limits
.
ffp_
textures
=
0
;
gl_info
->
limits
.
texture_coords
=
0
;
for
(
i
=
0
;
i
<
WINED3D_SHADER_TYPE_COUNT
;
++
i
)
{
...
...
@@ -2954,8 +2954,8 @@ 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_FFP_TEXTURES
,
gl_max
);
TRACE
(
"Max textures: %d.
\n
"
,
gl_info
->
limits
.
textures
);
gl_info
->
limits
.
ffp_
textures
=
min
(
WINED3D_MAX_FFP_TEXTURES
,
gl_max
);
TRACE
(
"Max textures: %d.
\n
"
,
gl_info
->
limits
.
ffp_
textures
);
if
(
gl_info
->
supported
[
ARB_FRAGMENT_PROGRAM
])
{
...
...
@@ -2964,7 +2964,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
}
else
{
gl_info
->
limits
.
texture_coords
=
gl_info
->
limits
.
textures
;
gl_info
->
limits
.
texture_coords
=
gl_info
->
limits
.
ffp_
textures
;
}
TRACE
(
"Max texture coords: %d.
\n
"
,
gl_info
->
limits
.
texture_coords
);
}
...
...
@@ -2976,7 +2976,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
}
else
{
gl_info
->
limits
.
samplers
[
WINED3D_SHADER_TYPE_PIXEL
]
=
gl_info
->
limits
.
textures
;
gl_info
->
limits
.
samplers
[
WINED3D_SHADER_TYPE_PIXEL
]
=
gl_info
->
limits
.
ffp_
textures
;
}
TRACE
(
"Max fragment samplers: %d.
\n
"
,
gl_info
->
limits
.
samplers
[
WINED3D_SHADER_TYPE_PIXEL
]);
...
...
@@ -3034,7 +3034,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
}
else
{
gl_info
->
limits
.
textures
=
1
;
gl_info
->
limits
.
ffp_
textures
=
1
;
gl_info
->
limits
.
texture_coords
=
1
;
}
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
15140e76
...
...
@@ -490,7 +490,7 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[WINED3D_MAX_FFP_TE
checkGLcall
(
"GL_EXTCALL(glBeginFragmentShaderATI())"
);
/* Pass 1: Generate sampling instructions for perturbation maps */
for
(
stage
=
0
;
stage
<
gl_info
->
limits
.
textures
;
++
stage
)
for
(
stage
=
0
;
stage
<
gl_info
->
limits
.
ffp_
textures
;
++
stage
)
{
if
(
op
[
stage
].
cop
==
WINED3D_TOP_DISABLE
)
break
;
...
...
@@ -517,7 +517,7 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[WINED3D_MAX_FFP_TE
}
/* Pass 2: Generate perturbation calculations */
for
(
stage
=
0
;
stage
<
gl_info
->
limits
.
textures
;
++
stage
)
for
(
stage
=
0
;
stage
<
gl_info
->
limits
.
ffp_
textures
;
++
stage
)
{
GLuint
argmodextra_x
,
argmodextra_y
;
struct
color_fixup_desc
fixup
;
...
...
@@ -568,7 +568,7 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[WINED3D_MAX_FFP_TE
}
/* Pass 3: Generate sampling instructions for regular textures */
for
(
stage
=
0
;
stage
<
gl_info
->
limits
.
textures
;
++
stage
)
for
(
stage
=
0
;
stage
<
gl_info
->
limits
.
ffp_
textures
;
++
stage
)
{
if
(
op
[
stage
].
cop
==
WINED3D_TOP_DISABLE
)
break
;
...
...
dlls/wined3d/context_gl.c
View file @
15140e76
...
...
@@ -2252,7 +2252,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
/* Set up the previous texture input for all shader units. This applies to bump mapping, and in d3d
* the previous texture where to source the offset from is always unit - 1.
*/
for
(
i
=
1
;
i
<
gl_info
->
limits
.
textures
;
++
i
)
for
(
i
=
1
;
i
<
gl_info
->
limits
.
ffp_
textures
;
++
i
)
{
wined3d_context_gl_active_texture
(
context_gl
,
gl_info
,
i
);
gl_info
->
gl_ops
.
gl
.
p_glTexEnvi
(
GL_TEXTURE_SHADER_NV
,
...
...
@@ -2283,7 +2283,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
if
(
gl_info
->
supported
[
ARB_POINT_SPRITE
])
{
for
(
i
=
0
;
i
<
gl_info
->
limits
.
textures
;
++
i
)
for
(
i
=
0
;
i
<
gl_info
->
limits
.
ffp_
textures
;
++
i
)
{
wined3d_context_gl_active_texture
(
context_gl
,
gl_info
,
i
);
gl_info
->
gl_ops
.
gl
.
p_glTexEnvi
(
GL_POINT_SPRITE_ARB
,
GL_COORD_REPLACE_ARB
,
GL_TRUE
);
...
...
@@ -3373,7 +3373,7 @@ void wined3d_context_gl_apply_ffp_blit_state(struct wined3d_context_gl *context_
/* Disable all textures. The caller can then bind a texture it wants to blit
* from. */
for
(
i
=
gl_info
->
limits
.
textures
-
1
;
i
>
0
;
--
i
)
for
(
i
=
gl_info
->
limits
.
ffp_
textures
-
1
;
i
>
0
;
--
i
)
{
wined3d_context_gl_active_texture
(
context_gl
,
gl_info
,
i
);
...
...
@@ -5409,7 +5409,7 @@ void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context
if
(
gl_info
->
supported
[
NV_REGISTER_COMBINERS
])
{
/* The number of the mapped stages increases monotonically, so it's fine to use the last used one. */
for
(
texture_idx
=
mapped_stage
+
1
;
texture_idx
<
gl_info
->
limits
.
textures
;
++
texture_idx
)
for
(
texture_idx
=
mapped_stage
+
1
;
texture_idx
<
gl_info
->
limits
.
ffp_
textures
;
++
texture_idx
)
{
GL_EXTCALL
(
glMultiTexCoord4fARB
(
GL_TEXTURE0_ARB
+
texture_idx
,
0
,
0
,
0
,
1
));
}
...
...
dlls/wined3d/nvidia_texture_shader.c
View file @
15140e76
...
...
@@ -496,7 +496,7 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
if
(
mapped_stage
!=
WINED3D_UNMAPPED_STAGE
)
{
if
(
tex_used
&&
mapped_stage
>=
gl_info
->
limits
.
textures
)
if
(
tex_used
&&
mapped_stage
>=
gl_info
->
limits
.
ffp_
textures
)
{
FIXME
(
"Attempt to enable unsupported stage!
\n
"
);
return
;
...
...
@@ -533,7 +533,7 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_TEXTURE_RECTANGLE_ARB
);
checkGLcall
(
"glDisable(GL_TEXTURE_RECTANGLE_ARB)"
);
}
if
(
gl_info
->
supported
[
NV_TEXTURE_SHADER2
]
&&
mapped_stage
<
gl_info
->
limits
.
textures
)
if
(
gl_info
->
supported
[
NV_TEXTURE_SHADER2
]
&&
mapped_stage
<
gl_info
->
limits
.
ffp_
textures
)
{
gl_info
->
gl_ops
.
gl
.
p_glTexEnvi
(
GL_TEXTURE_SHADER_NV
,
GL_SHADER_OPERATION_NV
,
GL_NONE
);
}
...
...
@@ -609,7 +609,7 @@ static void nvts_texdim(struct wined3d_context *context, const struct wined3d_st
/* No need to enable / disable anything here for unused samplers. The tex_colorop
* handler takes care. Also no action is needed with pixel shaders, or if tex_colorop
* will take care of this business. */
if
(
mapped_stage
==
WINED3D_UNMAPPED_STAGE
||
mapped_stage
>=
context_gl
->
gl_info
->
limits
.
textures
)
if
(
mapped_stage
==
WINED3D_UNMAPPED_STAGE
||
mapped_stage
>=
context_gl
->
gl_info
->
limits
.
ffp_
textures
)
return
;
if
(
sampler
>=
context
->
lowest_disabled_stage
)
return
;
...
...
@@ -633,7 +633,7 @@ static void nvts_bumpenvmat(struct wined3d_context *context, const struct wined3
* map is read from a specified source stage(always stage - 1 for d3d). Thus set the matrix
* for stage + 1. Keep the nvrc tex unit mapping in mind too
*/
if
(
mapped_stage
<
gl_info
->
limits
.
textures
)
if
(
mapped_stage
<
gl_info
->
limits
.
ffp_
textures
)
{
wined3d_context_gl_active_texture
(
context_gl
,
gl_info
,
mapped_stage
);
...
...
@@ -748,7 +748,7 @@ static void nvrc_fragment_get_caps(const struct wined3d_adapter *adapter, struct
#endif
caps
->
MaxTextureBlendStages
=
min
(
WINED3D_MAX_FFP_TEXTURES
,
gl_info
->
limits
.
general_combiners
);
caps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
caps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
ffp_
textures
;
}
static
unsigned
int
nvrc_fragment_get_emul_mask
(
const
struct
wined3d_adapter
*
adapter
)
...
...
dlls/wined3d/state.c
View file @
15140e76
...
...
@@ -3073,7 +3073,7 @@ static void tex_colorop(struct wined3d_context *context, const struct wined3d_st
if
(
mapped_stage
!=
WINED3D_UNMAPPED_STAGE
)
{
if
(
tex_used
&&
mapped_stage
>=
gl_info
->
limits
.
textures
)
if
(
tex_used
&&
mapped_stage
>=
gl_info
->
limits
.
ffp_
textures
)
{
FIXME
(
"Attempt to enable unsupported stage!
\n
"
);
return
;
...
...
@@ -3131,7 +3131,7 @@ void tex_alphaop(struct wined3d_context *context, const struct wined3d_state *st
/* Do not care for enabled / disabled stages, just assign the settings. colorop disables / enables required stuff */
if
(
mapped_stage
!=
WINED3D_UNMAPPED_STAGE
)
{
if
(
tex_used
&&
mapped_stage
>=
gl_info
->
limits
.
textures
)
if
(
tex_used
&&
mapped_stage
>=
gl_info
->
limits
.
ffp_
textures
)
{
FIXME
(
"Attempt to enable unsupported stage!
\n
"
);
return
;
...
...
@@ -3232,7 +3232,7 @@ static void transform_texture(struct wined3d_context *context, const struct wine
}
if
(
mapped_stage
==
WINED3D_UNMAPPED_STAGE
)
return
;
if
(
mapped_stage
>=
gl_info
->
limits
.
textures
)
return
;
if
(
mapped_stage
>=
gl_info
->
limits
.
ffp_
textures
)
return
;
wined3d_context_gl_active_texture
(
context_gl
,
gl_info
,
mapped_stage
);
gl_info
->
gl_ops
.
gl
.
p_glMatrixMode
(
GL_TEXTURE
);
...
...
@@ -5185,8 +5185,8 @@ static void ffp_fragment_get_caps(const struct wined3d_adapter *adapter, struct
if
(
gl_info
->
supported
[
ARB_TEXTURE_ENV_DOT3
])
caps
->
TextureOpCaps
|=
WINED3DTEXOPCAPS_DOTPRODUCT3
;
caps
->
MaxTextureBlendStages
=
gl_info
->
limits
.
textures
;
caps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
caps
->
MaxTextureBlendStages
=
gl_info
->
limits
.
ffp_
textures
;
caps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
ffp_
textures
;
}
static
unsigned
int
ffp_fragment_get_emul_mask
(
const
struct
wined3d_adapter
*
adapter
)
...
...
dlls/wined3d/utils.c
View file @
15140e76
...
...
@@ -6805,7 +6805,7 @@ void sampler_texdim(struct wined3d_context *context, const struct wined3d_state
* tex_colorop handler takes care. Also no action is needed with pixel
* shaders, or if tex_colorop will take care of this business. */
mapped_stage
=
context_gl
->
tex_unit_map
[
sampler
];
if
(
mapped_stage
==
WINED3D_UNMAPPED_STAGE
||
mapped_stage
>=
context_gl
->
gl_info
->
limits
.
textures
)
if
(
mapped_stage
==
WINED3D_UNMAPPED_STAGE
||
mapped_stage
>=
context_gl
->
gl_info
->
limits
.
ffp_
textures
)
return
;
if
(
sampler
>=
context
->
lowest_disabled_stage
)
return
;
...
...
dlls/wined3d/wined3d_gl.h
View file @
15140e76
...
...
@@ -276,7 +276,7 @@ struct wined3d_gl_limits
{
unsigned
int
buffers
;
unsigned
int
lights
;
unsigned
int
textures
;
unsigned
int
ffp_
textures
;
unsigned
int
texture_coords
;
unsigned
int
uniform_blocks
[
WINED3D_SHADER_TYPE_COUNT
];
unsigned
int
samplers
[
WINED3D_SHADER_TYPE_COUNT
];
...
...
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