Rebase against dfeded6460ce067fe1c0540306c2964a170bed2a.

This commit is contained in:
Alistair Leslie-Hughes
2021-10-12 09:22:48 +11:00
parent 5e9626af6c
commit c7f16e15e7
12 changed files with 58 additions and 157 deletions

View File

@@ -1,4 +1,4 @@
From 673e8c2b688451f8bfa7fc1c45ba2f7c8be19614 Mon Sep 17 00:00:00 2001
From e54feda95d0e88080d118d2079c62f091dffe3e3 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sat, 22 May 2021 17:38:50 -0500
Subject: [PATCH] wined3d: Make depth bounds test into a proper state.
@@ -12,10 +12,10 @@ Subject: [PATCH] wined3d: Make depth bounds test into a proper state.
5 files changed, 98 insertions(+), 31 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 13c0fce5bb1..fb3e7db991f 100644
index 1b4ed519260..33a8519a613 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -135,6 +135,7 @@ enum wined3d_cs_op
@@ -145,6 +145,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_RENDER_STATE,
WINED3D_CS_OP_SET_TEXTURE_STATE,
WINED3D_CS_OP_SET_SAMPLER_STATE,
@@ -23,7 +23,7 @@ index 13c0fce5bb1..fb3e7db991f 100644
WINED3D_CS_OP_SET_TRANSFORM,
WINED3D_CS_OP_SET_CLIP_PLANE,
WINED3D_CS_OP_SET_COLOR_KEY,
@@ -385,6 +386,12 @@ struct wined3d_cs_set_sampler_state
@@ -395,6 +396,12 @@ struct wined3d_cs_set_sampler_state
DWORD value;
};
@@ -36,7 +36,7 @@ index 13c0fce5bb1..fb3e7db991f 100644
struct wined3d_cs_set_transform
{
enum wined3d_cs_op opcode;
@@ -609,6 +616,7 @@ static const char *debug_cs_op(enum wined3d_cs_op op)
@@ -619,6 +626,7 @@ static const char *debug_cs_op(enum wined3d_cs_op op)
WINED3D_TO_STR(WINED3D_CS_OP_SET_RENDER_STATE);
WINED3D_TO_STR(WINED3D_CS_OP_SET_TEXTURE_STATE);
WINED3D_TO_STR(WINED3D_CS_OP_SET_SAMPLER_STATE);
@@ -44,7 +44,7 @@ index 13c0fce5bb1..fb3e7db991f 100644
WINED3D_TO_STR(WINED3D_CS_OP_SET_TRANSFORM);
WINED3D_TO_STR(WINED3D_CS_OP_SET_CLIP_PLANE);
WINED3D_TO_STR(WINED3D_CS_OP_SET_COLOR_KEY);
@@ -1923,6 +1931,28 @@ void wined3d_device_context_emit_set_sampler_state(struct wined3d_device_context
@@ -1939,6 +1947,28 @@ void wined3d_device_context_emit_set_sampler_state(struct wined3d_device_context
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT);
}
@@ -73,7 +73,7 @@ index 13c0fce5bb1..fb3e7db991f 100644
static void wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_transform *op = data;
@@ -2917,6 +2947,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2963,6 +2993,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_RENDER_STATE */ wined3d_cs_exec_set_render_state,
/* WINED3D_CS_OP_SET_TEXTURE_STATE */ wined3d_cs_exec_set_texture_state,
/* WINED3D_CS_OP_SET_SAMPLER_STATE */ wined3d_cs_exec_set_sampler_state,
@@ -82,11 +82,11 @@ index 13c0fce5bb1..fb3e7db991f 100644
/* WINED3D_CS_OP_SET_CLIP_PLANE */ wined3d_cs_exec_set_clip_plane,
/* WINED3D_CS_OP_SET_COLOR_KEY */ wined3d_cs_exec_set_color_key,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index d2147447ee0..cc100b02bac 100644
index 436c4dfe854..b0c7579b4ed 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1891,6 +1891,14 @@ void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_con
wined3d_rasterizer_state_decref(prev);
@@ -1923,6 +1923,14 @@ out:
wined3d_mutex_unlock();
}
+static void wined3d_device_context_set_depth_bounds(struct wined3d_device_context *context,
@@ -100,7 +100,7 @@ index d2147447ee0..cc100b02bac 100644
void CDECL wined3d_device_context_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,
const struct wined3d_viewport *viewports)
{
@@ -3546,7 +3554,8 @@ static void wined3d_device_set_texture(struct wined3d_device *device,
@@ -3612,7 +3620,8 @@ static void wined3d_device_set_texture(struct wined3d_device *device,
void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
struct wined3d_stateblock *stateblock)
{
@@ -110,7 +110,7 @@ index d2147447ee0..cc100b02bac 100644
const struct wined3d_stateblock_state *state = &stateblock->stateblock_state;
const struct wined3d_saved_states *changed = &stateblock->changed;
const unsigned int word_bit_count = sizeof(DWORD) * CHAR_BIT;
@@ -3652,7 +3661,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
@@ -3718,7 +3727,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
case WINED3D_RS_COLORWRITEENABLE1:
case WINED3D_RS_COLORWRITEENABLE2:
case WINED3D_RS_COLORWRITEENABLE3:
@@ -119,7 +119,7 @@ index d2147447ee0..cc100b02bac 100644
break;
case WINED3D_RS_BACK_STENCILFAIL:
@@ -3671,7 +3680,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
@@ -3737,7 +3746,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
case WINED3D_RS_ZENABLE:
case WINED3D_RS_ZFUNC:
case WINED3D_RS_ZWRITEENABLE:
@@ -128,7 +128,7 @@ index d2147447ee0..cc100b02bac 100644
break;
case WINED3D_RS_FILLMODE:
@@ -3680,9 +3689,15 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
@@ -3746,9 +3755,15 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
case WINED3D_RS_DEPTHBIAS:
case WINED3D_RS_SCISSORTESTENABLE:
case WINED3D_RS_ANTIALIASEDLINEENABLE:
@@ -145,7 +145,7 @@ index d2147447ee0..cc100b02bac 100644
default:
wined3d_device_set_render_state(device, idx, state->rs[idx]);
break;
@@ -3871,6 +3886,20 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
@@ -3937,6 +3952,20 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
}
}
@@ -245,10 +245,10 @@ index 8316269afcf..6cd4ff30458 100644
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), { STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), state_msaa }, ARB_MULTISAMPLE },
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), { STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), state_msaa_w }, WINED3D_GL_EXT_NONE },
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 4019dd4d812..9b58c217a0c 100644
index 47718c9f710..39d39396a6e 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -5321,6 +5321,8 @@ const char *debug_d3dstate(DWORD state)
@@ -5323,6 +5323,8 @@ const char *debug_d3dstate(DWORD state)
return "STATE_DEPTH_STENCIL";
if (STATE_IS_STENCIL_REF(state))
return "STATE_STENCIL_REF";
@@ -258,10 +258,10 @@ index 4019dd4d812..9b58c217a0c 100644
return wine_dbg_sprintf("UNKNOWN_STATE(%#x)", state);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a2048fc6ea6..17ad7869d1b 100644
index 56c90ba6606..e7ee1c1478a 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1838,7 +1838,10 @@ void dispatch_compute(struct wined3d_device *device, const struct wined3d_state
@@ -1854,7 +1854,10 @@ void dispatch_compute(struct wined3d_device *device, const struct wined3d_state
#define STATE_STENCIL_REF (STATE_DEPTH_STENCIL + 1)
#define STATE_IS_STENCIL_REF(a) ((a) == STATE_STENCIL_REF)
@@ -273,7 +273,7 @@ index a2048fc6ea6..17ad7869d1b 100644
#define STATE_COMPUTE_SHADER (STATE_COMPUTE_OFFSET)
#define STATE_IS_COMPUTE_SHADER(a) ((a) == STATE_COMPUTE_SHADER)
@@ -3670,6 +3673,13 @@ struct wined3d_light_state
@@ -3703,6 +3706,13 @@ struct wined3d_light_state
const struct wined3d_light_info *lights[WINED3D_MAX_ACTIVE_LIGHTS];
};
@@ -287,7 +287,7 @@ index a2048fc6ea6..17ad7869d1b 100644
#define WINED3D_STATE_NO_REF 0x00000001
#define WINED3D_STATE_INIT_DEFAULT 0x00000002
@@ -3724,8 +3734,11 @@ struct wined3d_state
@@ -3757,8 +3767,11 @@ struct wined3d_state
struct wined3d_blend_state *blend_state;
struct wined3d_color blend_factor;
unsigned int sample_mask;
@@ -299,7 +299,7 @@ index a2048fc6ea6..17ad7869d1b 100644
struct wined3d_rasterizer_state *rasterizer_state;
};
@@ -4806,6 +4819,8 @@ void wined3d_device_context_emit_set_clip_plane(struct wined3d_device_context *c
@@ -4878,6 +4891,8 @@ void wined3d_device_context_emit_set_clip_plane(struct wined3d_device_context *c
void wined3d_device_context_emit_set_constant_buffers(struct wined3d_device_context *context,
enum wined3d_shader_type type, unsigned int start_idx, unsigned int count,
const struct wined3d_constant_buffer_state *buffers) DECLSPEC_HIDDEN;
@@ -309,5 +309,5 @@ index a2048fc6ea6..17ad7869d1b 100644
struct wined3d_depth_stencil_state *state, unsigned int stencil_ref) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_depth_stencil_view(struct wined3d_device_context *context,
--
2.30.2
2.33.0

View File

@@ -1,4 +1,4 @@
From ede7d81998194cecad240bd3df4cd902c01a0bde Mon Sep 17 00:00:00 2001
From c7cbd42a6085d03a94ee4ac9b77834b3725bf033 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sat, 22 May 2021 18:11:07 -0500
Subject: [PATCH] nvapi: Implement NvAPI_D3D11_SetDepthBoundsTest().
@@ -117,11 +117,11 @@ index c8b66ac2fa3..b8b4750203a 100644
/* d3d9 tests */
wc.lpfnWndProc = DefWindowProcA;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index cc100b02bac..962112074a4 100644
index b0c7579b4ed..8c61c530812 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1891,7 +1891,7 @@ void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_con
wined3d_rasterizer_state_decref(prev);
@@ -1923,7 +1923,7 @@ out:
wined3d_mutex_unlock();
}
-static void wined3d_device_context_set_depth_bounds(struct wined3d_device_context *context,
@@ -155,5 +155,5 @@ index 7be893b8f21..689fc55fdfe 100644
struct wined3d_depth_stencil_state *depth_stencil_state, unsigned int stencil_ref);
HRESULT __cdecl wined3d_device_context_set_depth_stencil_view(struct wined3d_device_context *context,
--
2.30.2
2.33.0