Standalone MR: - the argN and texture_id types could have been alternatively changed into unsigned int. - that would save a couple of size specifier in printf (this patch and next ones), but at the cost of lots of other changes: - as texture_id is used in some apply methods, that would mean ~200 function prototypes to change - didn't count for argN (even this could be changed on function level, contrary the previous item)
From: Eric Pouech eric.pouech@gmail.com
--- dlls/wined3d/nvidia_texture_shader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index efa9f703d2f..c6687d1ece6 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -89,7 +89,7 @@ struct tex_op_args GLenum component_usage[3]; };
-static GLenum d3dta_to_combiner_input(DWORD d3dta, DWORD stage, INT texture_idx) { +static GLenum d3dta_to_combiner_input(unsigned int d3dta, DWORD stage, INT texture_idx) { switch (d3dta) { case WINED3DTA_DIFFUSE: return GL_PRIMARY_COLOR_NV; @@ -481,7 +481,7 @@ void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d
static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); + unsigned int stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); struct wined3d_context_gl *context_gl = wined3d_context_gl(context); BOOL tex_used = context->fixed_function_usage_map & (1u << stage); const struct wined3d_gl_info *gl_info = context_gl->gl_info; @@ -584,7 +584,7 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
static void nvrc_resultarg(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); + unsigned int stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
TRACE("Setting result arg for stage %u.\n", stage);
From: Eric Pouech eric.pouech@gmail.com
--- dlls/wined3d/nvidia_texture_shader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index c6687d1ece6..b80532fd0c4 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -19,7 +19,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WINE_NO_LONG_TYPES /* temporary */
#include <stdio.h>
@@ -152,7 +151,7 @@ void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d GLenum target = GL_COMBINER0_NV + stage; GLenum output;
- TRACE("stage %d, is_alpha %d, op %s, arg1 %#x, arg2 %#x, arg3 %#x, texture_idx %d\n", + TRACE("stage %d, is_alpha %d, op %s, arg1 %#lx, arg2 %#lx, arg3 %#lx, texture_idx %d\n", stage, is_alpha, debug_d3dtop(op), arg1, arg2, arg3, texture_idx);
/* If a texture stage references an invalid texture unit the stage just @@ -471,7 +470,7 @@ void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d break;
default: - FIXME("Unhandled texture op: stage %d, is_alpha %d, op %s (%#x), arg1 %#x, arg2 %#x, arg3 %#x, texture_idx %d.\n", + FIXME("Unhandled texture op: stage %d, is_alpha %d, op %s (%#x), arg1 %#lx, arg2 %#lx, arg3 %#lx, texture_idx %d.\n", stage, is_alpha, debug_d3dtop(op), op, arg1, arg2, arg3, texture_idx); }
I'm confused, isn't texture_idx already an int type?
On Wed Dec 7 07:54:18 2022 +0000, Zebediah Figura wrote:
I'm confused, isn't texture_idx already an int type?
yes (sorry I've mixed up with another parameter from yet to come patches); so the note should read: * the argN types could have been alternatively changed into unsigned int (also deciding whether it's done for this function only, all for all parameters for all callouts)
This merge request was closed by eric pouech.
it's done by now. closing.