Rebase against d60c450c7be196c2072f74e34f7760d39e3bad32.

This commit is contained in:
Alistair Leslie-Hughes
2021-07-20 11:04:44 +10:00
parent 183fd3e089
commit 5e8fbbf200
12 changed files with 114 additions and 116 deletions

View File

@@ -1,4 +1,4 @@
From cd91540817d4ead5855a3c21c54e6fd9d07af68a Mon Sep 17 00:00:00 2001
From 673e8c2b688451f8bfa7fc1c45ba2f7c8be19614 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 1deafc2d4c3..2b765df30d8 100644
index 13c0fce5bb1..fb3e7db991f 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -132,6 +132,7 @@ enum wined3d_cs_op
@@ -135,6 +135,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 1deafc2d4c3..2b765df30d8 100644
WINED3D_CS_OP_SET_TRANSFORM,
WINED3D_CS_OP_SET_CLIP_PLANE,
WINED3D_CS_OP_SET_COLOR_KEY,
@@ -388,6 +389,12 @@ struct wined3d_cs_set_sampler_state
@@ -385,6 +386,12 @@ struct wined3d_cs_set_sampler_state
DWORD value;
};
@@ -36,7 +36,7 @@ index 1deafc2d4c3..2b765df30d8 100644
struct wined3d_cs_set_transform
{
enum wined3d_cs_op opcode;
@@ -613,6 +620,7 @@ static const char *debug_cs_op(enum wined3d_cs_op op)
@@ -609,6 +616,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 1deafc2d4c3..2b765df30d8 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);
@@ -1934,6 +1942,28 @@ void wined3d_device_context_emit_set_sampler_state(struct wined3d_device_context
@@ -1923,6 +1931,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 1deafc2d4c3..2b765df30d8 100644
static void wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_transform *op = data;
@@ -2926,6 +2956,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2917,6 +2947,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,10 +82,10 @@ index 1deafc2d4c3..2b765df30d8 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 175a3b7ed0b..0d6cd8871c1 100644
index d2147447ee0..cc100b02bac 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1925,6 +1925,14 @@ void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_con
@@ -1891,6 +1891,14 @@ void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_con
wined3d_rasterizer_state_decref(prev);
}
@@ -100,7 +100,7 @@ index 175a3b7ed0b..0d6cd8871c1 100644
void CDECL wined3d_device_context_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,
const struct wined3d_viewport *viewports)
{
@@ -3568,7 +3576,8 @@ static void wined3d_device_set_texture(struct wined3d_device *device,
@@ -3546,7 +3554,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 175a3b7ed0b..0d6cd8871c1 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;
@@ -3674,7 +3683,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
@@ -3652,7 +3661,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 175a3b7ed0b..0d6cd8871c1 100644
break;
case WINED3D_RS_BACK_STENCILFAIL:
@@ -3693,7 +3702,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
@@ -3671,7 +3680,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 175a3b7ed0b..0d6cd8871c1 100644
break;
case WINED3D_RS_FILLMODE:
@@ -3702,9 +3711,15 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
@@ -3680,9 +3689,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 175a3b7ed0b..0d6cd8871c1 100644
default:
wined3d_device_set_render_state(device, idx, state->rs[idx]);
break;
@@ -3893,6 +3908,20 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
@@ -3871,6 +3886,20 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
}
}
@@ -167,7 +167,7 @@ index 175a3b7ed0b..0d6cd8871c1 100644
{
map = changed->textureState[i];
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index a9183278d86..73a40628f21 100644
index 8316269afcf..6cd4ff30458 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -2040,42 +2040,31 @@ static void state_tessellation(struct wined3d_context *context, const struct win
@@ -227,7 +227,7 @@ index a9183278d86..73a40628f21 100644
}
static void state_wrapu(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
@@ -4682,6 +4671,8 @@ const struct wined3d_state_entry_template misc_state_template_gl[] =
@@ -4685,6 +4674,8 @@ const struct wined3d_state_entry_template misc_state_template_gl[] =
{ STATE_DEPTH_STENCIL, { STATE_DEPTH_STENCIL, depth_stencil_2s }, EXT_STENCIL_TWO_SIDE },
{ STATE_DEPTH_STENCIL, { STATE_DEPTH_STENCIL, depth_stencil }, WINED3D_GL_EXT_NONE },
{ STATE_STENCIL_REF, { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE },
@@ -236,7 +236,7 @@ index a9183278d86..73a40628f21 100644
{ STATE_STREAMSRC, { STATE_STREAMSRC, streamsrc }, WINED3D_GL_EXT_NONE },
{ STATE_VDECL, { STATE_VDECL, vdecl_miscpart }, WINED3D_GL_EXT_NONE },
{ STATE_RASTERIZER, { STATE_RASTERIZER, rasterizer_cc }, ARB_CLIP_CONTROL },
@@ -4795,7 +4786,6 @@ const struct wined3d_state_entry_template misc_state_template_gl[] =
@@ -4798,7 +4789,6 @@ const struct wined3d_state_entry_template misc_state_template_gl[] =
{ STATE_RENDER(WINED3D_RS_ADAPTIVETESS_Y), { STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION),NULL }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_ADAPTIVETESS_Z), { STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION),NULL }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_ADAPTIVETESS_W), { STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION),NULL }, WINED3D_GL_EXT_NONE },
@@ -258,7 +258,7 @@ 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 91fb681a691..cca8c9cf07d 100644
index a2048fc6ea6..17ad7869d1b 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
@@ -273,7 +273,7 @@ index 91fb681a691..cca8c9cf07d 100644
#define STATE_COMPUTE_SHADER (STATE_COMPUTE_OFFSET)
#define STATE_IS_COMPUTE_SHADER(a) ((a) == STATE_COMPUTE_SHADER)
@@ -3676,6 +3679,13 @@ struct wined3d_light_state
@@ -3670,6 +3673,13 @@ struct wined3d_light_state
const struct wined3d_light_info *lights[WINED3D_MAX_ACTIVE_LIGHTS];
};
@@ -287,7 +287,7 @@ index 91fb681a691..cca8c9cf07d 100644
#define WINED3D_STATE_NO_REF 0x00000001
#define WINED3D_STATE_INIT_DEFAULT 0x00000002
@@ -3730,8 +3740,11 @@ struct wined3d_state
@@ -3724,8 +3734,11 @@ struct wined3d_state
struct wined3d_blend_state *blend_state;
struct wined3d_color blend_factor;
unsigned int sample_mask;
@@ -299,10 +299,10 @@ index 91fb681a691..cca8c9cf07d 100644
struct wined3d_rasterizer_state *rasterizer_state;
};
@@ -4813,6 +4826,8 @@ void wined3d_device_context_emit_set_clip_plane(struct wined3d_device_context *c
@@ -4806,6 +4819,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,
struct wined3d_buffer *const *buffers) DECLSPEC_HIDDEN;
const struct wined3d_constant_buffer_state *buffers) DECLSPEC_HIDDEN;
+void wined3d_device_context_emit_set_depth_bounds(struct wined3d_device_context *context,
+ BOOL enable, float min, float max) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_context *context,

View File

@@ -1,4 +1,4 @@
From 929a7c148fd83663ffde2a853177a6ca2c30588c Mon Sep 17 00:00:00 2001
From ede7d81998194cecad240bd3df4cd902c01a0bde 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,10 +117,10 @@ index c8b66ac2fa3..b8b4750203a 100644
/* d3d9 tests */
wc.lpfnWndProc = DefWindowProcA;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0d6cd8871c1..9910b0e3529 100644
index cc100b02bac..962112074a4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1925,7 +1925,7 @@ void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_con
@@ -1891,7 +1891,7 @@ void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_con
wined3d_rasterizer_state_decref(prev);
}
@@ -130,7 +130,7 @@ index 0d6cd8871c1..9910b0e3529 100644
{
TRACE("context %p, enable %d, min %.8e, max %.8e.\n", context, enable, min, max);
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 4d4f34f8d6a..e83847aa9f9 100644
index 1bce4def265..802194dcbec 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -124,6 +124,7 @@
@@ -142,13 +142,13 @@ index 4d4f34f8d6a..e83847aa9f9 100644
@ cdecl wined3d_device_context_set_depth_stencil_view(ptr ptr)
@ cdecl wined3d_device_context_set_index_buffer(ptr ptr long long)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 80a636edc9f..2167d95d0b8 100644
index 7be893b8f21..689fc55fdfe 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2499,6 +2499,8 @@ void __cdecl wined3d_device_context_set_blend_state(struct wined3d_device_contex
@@ -2513,6 +2513,8 @@ void __cdecl wined3d_device_context_set_blend_state(struct wined3d_device_contex
void __cdecl wined3d_device_context_set_constant_buffers(struct wined3d_device_context *context,
enum wined3d_shader_type type, unsigned int start_idx, unsigned int count,
struct wined3d_buffer *const *buffers);
const struct wined3d_constant_buffer_state *buffers);
+void __cdecl wined3d_device_context_set_depth_bounds(struct wined3d_device_context *context,
+ BOOL enable, float min, float max);
void __cdecl wined3d_device_context_set_depth_stencil_state(struct wined3d_device_context *context,