wined3d: Add a miscellaneous state template for the Vulkan adapter.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2020-04-23 02:04:55 +04:30 committed by Alexandre Julliard
parent d1bc6843ba
commit 599a299288
6 changed files with 349 additions and 3 deletions

View File

@ -5115,6 +5115,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
adapter_gl->a.shader_backend->shader_get_caps(&adapter_gl->a, &shader_caps);
adapter_gl->a.vertex_pipe->vp_get_caps(&adapter_gl->a, &vertex_caps);
adapter_gl->a.misc_state_template = misc_state_template_gl;
adapter_gl->a.fragment_pipe->get_caps(&adapter_gl->a, &fragment_caps);
d3d_info->limits.vs_version = shader_caps.vs_version;

View File

@ -24,6 +24,177 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
static const struct wined3d_state_entry_template misc_state_template_vk[] =
{
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_VERTEX), {STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_VERTEX), state_nop}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_HULL), {STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_HULL), state_nop}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_DOMAIN), {STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_DOMAIN), state_nop}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_GEOMETRY), {STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_GEOMETRY), state_nop}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_PIXEL), {STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_PIXEL), state_nop}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_COMPUTE), {STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_COMPUTE), state_nop}},
{STATE_GRAPHICS_SHADER_RESOURCE_BINDING, {STATE_GRAPHICS_SHADER_RESOURCE_BINDING, state_nop}},
{STATE_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING, {STATE_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING, state_nop}},
{STATE_COMPUTE_SHADER_RESOURCE_BINDING, {STATE_COMPUTE_SHADER_RESOURCE_BINDING, state_nop}},
{STATE_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING, {STATE_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING, state_nop}},
{STATE_STREAM_OUTPUT, {STATE_STREAM_OUTPUT, state_nop}},
{STATE_BLEND, {STATE_BLEND, state_nop}},
{STATE_BLEND_FACTOR, {STATE_BLEND_FACTOR, state_nop}},
{STATE_STREAMSRC, {STATE_STREAMSRC, state_nop}},
{STATE_VDECL, {STATE_VDECL, state_nop}},
{STATE_RASTERIZER, {STATE_RASTERIZER, state_nop}},
{STATE_SCISSORRECT, {STATE_SCISSORRECT, state_nop}},
{STATE_POINTSPRITECOORDORIGIN, {STATE_POINTSPRITECOORDORIGIN, state_nop}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), state_nop}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), state_nop}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), state_nop}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), state_nop}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), state_nop}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), state_nop}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), state_nop}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), state_nop}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00)}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), state_nop}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE)}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), state_nop}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE)}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), state_nop}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE)}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), state_nop}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE)}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), state_nop}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE)}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), state_nop}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE)}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), state_nop}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE)}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), state_nop}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE)}},
{STATE_VIEWPORT, {STATE_VIEWPORT, state_nop}},
{STATE_INDEXBUFFER, {STATE_INDEXBUFFER, state_nop}},
{STATE_RENDER(WINED3D_RS_ANTIALIAS), {STATE_RENDER(WINED3D_RS_ANTIALIAS), state_nop}},
{STATE_RENDER(WINED3D_RS_TEXTUREPERSPECTIVE), {STATE_RENDER(WINED3D_RS_TEXTUREPERSPECTIVE), state_nop}},
{STATE_RENDER(WINED3D_RS_ZENABLE), {STATE_RENDER(WINED3D_RS_ZENABLE), state_nop}},
{STATE_RENDER(WINED3D_RS_WRAPU), {STATE_RENDER(WINED3D_RS_WRAPU), state_nop}},
{STATE_RENDER(WINED3D_RS_WRAPV), {STATE_RENDER(WINED3D_RS_WRAPV), state_nop}},
{STATE_RENDER(WINED3D_RS_LINEPATTERN), {STATE_RENDER(WINED3D_RS_LINEPATTERN), state_nop}},
{STATE_RENDER(WINED3D_RS_MONOENABLE), {STATE_RENDER(WINED3D_RS_MONOENABLE), state_nop}},
{STATE_RENDER(WINED3D_RS_ROP2), {STATE_RENDER(WINED3D_RS_ROP2), state_nop}},
{STATE_RENDER(WINED3D_RS_PLANEMASK), {STATE_RENDER(WINED3D_RS_PLANEMASK), state_nop}},
{STATE_RENDER(WINED3D_RS_ZWRITEENABLE), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_LASTPIXEL), {STATE_RENDER(WINED3D_RS_LASTPIXEL), state_nop}},
{STATE_RENDER(WINED3D_RS_ZFUNC), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_DITHERENABLE), {STATE_RENDER(WINED3D_RS_DITHERENABLE), state_nop}},
{STATE_RENDER(WINED3D_RS_SUBPIXEL), {STATE_RENDER(WINED3D_RS_SUBPIXEL), state_nop}},
{STATE_RENDER(WINED3D_RS_SUBPIXELX), {STATE_RENDER(WINED3D_RS_SUBPIXELX), state_nop}},
{STATE_RENDER(WINED3D_RS_STIPPLEDALPHA), {STATE_RENDER(WINED3D_RS_STIPPLEDALPHA), state_nop}},
{STATE_RENDER(WINED3D_RS_STIPPLEENABLE), {STATE_RENDER(WINED3D_RS_STIPPLEENABLE), state_nop}},
{STATE_RENDER(WINED3D_RS_MIPMAPLODBIAS), {STATE_RENDER(WINED3D_RS_MIPMAPLODBIAS), state_nop}},
{STATE_RENDER(WINED3D_RS_ANISOTROPY), {STATE_RENDER(WINED3D_RS_ANISOTROPY), state_nop}},
{STATE_RENDER(WINED3D_RS_FLUSHBATCH), {STATE_RENDER(WINED3D_RS_FLUSHBATCH), state_nop}},
{STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), state_nop}},
{STATE_RENDER(WINED3D_RS_STENCILENABLE), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_STENCILFAIL), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_STENCILPASS), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_STENCILFUNC), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_STENCILMASK), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_STENCILWRITEMASK), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_BACK_STENCILPASS), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_BACK_STENCILFUNC), {STATE_RENDER(WINED3D_RS_ZENABLE)}},
{STATE_RENDER(WINED3D_RS_WRAP0), {STATE_RENDER(WINED3D_RS_WRAP0), state_nop}},
{STATE_RENDER(WINED3D_RS_WRAP1), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP2), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP3), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP4), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP5), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP6), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP7), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP8), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP9), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP10), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP11), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP12), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP13), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP14), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_WRAP15), {STATE_RENDER(WINED3D_RS_WRAP0)}},
{STATE_RENDER(WINED3D_RS_EXTENTS), {STATE_RENDER(WINED3D_RS_EXTENTS), state_nop}},
{STATE_RENDER(WINED3D_RS_COLORKEYBLENDENABLE), {STATE_RENDER(WINED3D_RS_COLORKEYBLENDENABLE), state_nop}},
{STATE_RENDER(WINED3D_RS_SOFTWAREVERTEXPROCESSING), {STATE_RENDER(WINED3D_RS_SOFTWAREVERTEXPROCESSING), state_nop}},
{STATE_RENDER(WINED3D_RS_PATCHEDGESTYLE), {STATE_RENDER(WINED3D_RS_PATCHEDGESTYLE), state_nop}},
{STATE_RENDER(WINED3D_RS_PATCHSEGMENTS), {STATE_RENDER(WINED3D_RS_PATCHSEGMENTS), state_nop}},
{STATE_RENDER(WINED3D_RS_POSITIONDEGREE), {STATE_RENDER(WINED3D_RS_POSITIONDEGREE), state_nop}},
{STATE_RENDER(WINED3D_RS_NORMALDEGREE), {STATE_RENDER(WINED3D_RS_NORMALDEGREE), state_nop}},
{STATE_RENDER(WINED3D_RS_MINTESSELLATIONLEVEL), {STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION)}},
{STATE_RENDER(WINED3D_RS_MAXTESSELLATIONLEVEL), {STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION)}},
{STATE_RENDER(WINED3D_RS_ADAPTIVETESS_X), {STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION)}},
{STATE_RENDER(WINED3D_RS_ADAPTIVETESS_Y), {STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION)}},
{STATE_RENDER(WINED3D_RS_ADAPTIVETESS_Z), {STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION)}},
{STATE_RENDER(WINED3D_RS_ADAPTIVETESS_W), {STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION)}},
{STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION), {STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION), state_nop}},
{STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), {STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), state_nop}},
{STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), {STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), state_nop}},
{STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), {STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), state_nop}},
{STATE_RENDER(WINED3D_RS_ZVISIBLE), {STATE_RENDER(WINED3D_RS_ZVISIBLE), state_nop}},
/* Samplers */
{STATE_SAMPLER(0), {STATE_SAMPLER(0), state_nop}},
{STATE_SAMPLER(1), {STATE_SAMPLER(1), state_nop}},
{STATE_SAMPLER(2), {STATE_SAMPLER(2), state_nop}},
{STATE_SAMPLER(3), {STATE_SAMPLER(3), state_nop}},
{STATE_SAMPLER(4), {STATE_SAMPLER(4), state_nop}},
{STATE_SAMPLER(5), {STATE_SAMPLER(5), state_nop}},
{STATE_SAMPLER(6), {STATE_SAMPLER(6), state_nop}},
{STATE_SAMPLER(7), {STATE_SAMPLER(7), state_nop}},
{STATE_SAMPLER(8), {STATE_SAMPLER(8), state_nop}},
{STATE_SAMPLER(9), {STATE_SAMPLER(9), state_nop}},
{STATE_SAMPLER(10), {STATE_SAMPLER(10), state_nop}},
{STATE_SAMPLER(11), {STATE_SAMPLER(11), state_nop}},
{STATE_SAMPLER(12), {STATE_SAMPLER(12), state_nop}},
{STATE_SAMPLER(13), {STATE_SAMPLER(13), state_nop}},
{STATE_SAMPLER(14), {STATE_SAMPLER(14), state_nop}},
{STATE_SAMPLER(15), {STATE_SAMPLER(15), state_nop}},
{STATE_SAMPLER(16), /* Vertex sampler 0 */ {STATE_SAMPLER(16), state_nop}},
{STATE_SAMPLER(17), /* Vertex sampler 1 */ {STATE_SAMPLER(17), state_nop}},
{STATE_SAMPLER(18), /* Vertex sampler 2 */ {STATE_SAMPLER(18), state_nop}},
{STATE_SAMPLER(19), /* Vertex sampler 3 */ {STATE_SAMPLER(19), state_nop}},
{STATE_BASEVERTEXINDEX, {STATE_STREAMSRC}},
{STATE_FRAMEBUFFER, {STATE_FRAMEBUFFER, state_nop}},
{STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL), {STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL), state_nop}},
{STATE_SHADER(WINED3D_SHADER_TYPE_HULL), {STATE_SHADER(WINED3D_SHADER_TYPE_HULL), state_nop}},
{STATE_SHADER(WINED3D_SHADER_TYPE_DOMAIN), {STATE_SHADER(WINED3D_SHADER_TYPE_DOMAIN), state_nop}},
{STATE_SHADER(WINED3D_SHADER_TYPE_GEOMETRY), {STATE_SHADER(WINED3D_SHADER_TYPE_GEOMETRY), state_nop}},
{STATE_SHADER(WINED3D_SHADER_TYPE_COMPUTE), {STATE_SHADER(WINED3D_SHADER_TYPE_COMPUTE), state_nop}},
{0}, /* Terminate */
};
static inline const struct wined3d_adapter_vk *wined3d_adapter_vk_const(const struct wined3d_adapter *adapter)
{
return CONTAINING_RECORD(adapter, struct wined3d_adapter_vk, a);
@ -1556,6 +1727,7 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk,
adapter->vertex_pipe = &none_vertex_pipe;
adapter->fragment_pipe = &none_fragment_pipe;
adapter->misc_state_template = misc_state_template_vk;
adapter->shader_backend = &none_shader_backend;
wined3d_adapter_vk_init_d3d_info(adapter, wined3d_creation_flags);

View File

@ -5596,7 +5596,7 @@ HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined
if (vertex_pipeline->vp_states && fragment_pipeline->states
&& FAILED(hr = compile_state_table(device->state_table, device->multistate_funcs,
&adapter->d3d_info, adapter->gl_info.supported, vertex_pipeline,
fragment_pipeline, misc_state_template)))
fragment_pipeline, adapter->misc_state_template)))
{
ERR("Failed to compile state table, hr %#x.\n", hr);
wine_rb_destroy(&device->samplers, NULL, NULL);

View File

@ -2295,6 +2295,177 @@ HRESULT CDECL wined3d_device_create(struct wined3d *wined3d, struct wined3d_adap
return WINED3D_OK;
}
static const struct wined3d_state_entry_template misc_state_template_no3d[] =
{
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_VERTEX), {STATE_VDECL}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_HULL), {STATE_VDECL}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_DOMAIN), {STATE_VDECL}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_GEOMETRY), {STATE_VDECL}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_PIXEL), {STATE_VDECL}},
{STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_COMPUTE), {STATE_VDECL}},
{STATE_GRAPHICS_SHADER_RESOURCE_BINDING, {STATE_VDECL}},
{STATE_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING, {STATE_VDECL}},
{STATE_COMPUTE_SHADER_RESOURCE_BINDING, {STATE_VDECL}},
{STATE_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING, {STATE_VDECL}},
{STATE_STREAM_OUTPUT, {STATE_VDECL}},
{STATE_BLEND, {STATE_VDECL}},
{STATE_BLEND_FACTOR, {STATE_VDECL}},
{STATE_STREAMSRC, {STATE_VDECL}},
{STATE_VDECL, {STATE_VDECL, state_nop}},
{STATE_RASTERIZER, {STATE_VDECL}},
{STATE_SCISSORRECT, {STATE_VDECL}},
{STATE_POINTSPRITECOORDORIGIN, {STATE_VDECL}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), {STATE_VDECL}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT01), {STATE_VDECL}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT10), {STATE_VDECL}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT11), {STATE_VDECL}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), {STATE_VDECL}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT01), {STATE_VDECL}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT10), {STATE_VDECL}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT11), {STATE_VDECL}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), {STATE_VDECL}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT01), {STATE_VDECL}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT10), {STATE_VDECL}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT11), {STATE_VDECL}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), {STATE_VDECL}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT01), {STATE_VDECL}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT10), {STATE_VDECL}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT11), {STATE_VDECL}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), {STATE_VDECL}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT01), {STATE_VDECL}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT10), {STATE_VDECL}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT11), {STATE_VDECL}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), {STATE_VDECL}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT01), {STATE_VDECL}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT10), {STATE_VDECL}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT11), {STATE_VDECL}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), {STATE_VDECL}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT01), {STATE_VDECL}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT10), {STATE_VDECL}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT11), {STATE_VDECL}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), {STATE_VDECL}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT01), {STATE_VDECL}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT10), {STATE_VDECL}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT11), {STATE_VDECL}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), {STATE_VDECL}},
{STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_VDECL}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), {STATE_VDECL}},
{STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_VDECL}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), {STATE_VDECL}},
{STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_VDECL}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), {STATE_VDECL}},
{STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_VDECL}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), {STATE_VDECL}},
{STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_VDECL}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), {STATE_VDECL}},
{STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_VDECL}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), {STATE_VDECL}},
{STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_VDECL}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), {STATE_VDECL}},
{STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_VDECL}},
{STATE_VIEWPORT, {STATE_VDECL}},
{STATE_INDEXBUFFER, {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ANTIALIAS), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_TEXTUREPERSPECTIVE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ZENABLE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAPU), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAPV), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_LINEPATTERN), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_MONOENABLE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ROP2), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_PLANEMASK), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ZWRITEENABLE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_LASTPIXEL), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ZFUNC), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_DITHERENABLE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_SUBPIXEL), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_SUBPIXELX), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STIPPLEDALPHA), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STIPPLEENABLE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_MIPMAPLODBIAS), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ANISOTROPY), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_FLUSHBATCH), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STENCILENABLE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STENCILFAIL), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STENCILPASS), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STENCILFUNC), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STENCILMASK), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_STENCILWRITEMASK), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_BACK_STENCILPASS), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_BACK_STENCILFUNC), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP0), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP1), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP2), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP3), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP4), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP5), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP6), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP7), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP8), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP9), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP10), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP11), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP12), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP13), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP14), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_WRAP15), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_EXTENTS), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_COLORKEYBLENDENABLE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_SOFTWAREVERTEXPROCESSING), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_PATCHEDGESTYLE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_PATCHSEGMENTS), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_POSITIONDEGREE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_NORMALDEGREE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_MINTESSELLATIONLEVEL), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_MAXTESSELLATIONLEVEL), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ADAPTIVETESS_X), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ADAPTIVETESS_Y), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ADAPTIVETESS_Z), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ADAPTIVETESS_W), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ZVISIBLE), {STATE_VDECL}},
/* Samplers */
{STATE_SAMPLER(0), {STATE_VDECL}},
{STATE_SAMPLER(1), {STATE_VDECL}},
{STATE_SAMPLER(2), {STATE_VDECL}},
{STATE_SAMPLER(3), {STATE_VDECL}},
{STATE_SAMPLER(4), {STATE_VDECL}},
{STATE_SAMPLER(5), {STATE_VDECL}},
{STATE_SAMPLER(6), {STATE_VDECL}},
{STATE_SAMPLER(7), {STATE_VDECL}},
{STATE_SAMPLER(8), {STATE_VDECL}},
{STATE_SAMPLER(9), {STATE_VDECL}},
{STATE_SAMPLER(10), {STATE_VDECL}},
{STATE_SAMPLER(11), {STATE_VDECL}},
{STATE_SAMPLER(12), {STATE_VDECL}},
{STATE_SAMPLER(13), {STATE_VDECL}},
{STATE_SAMPLER(14), {STATE_VDECL}},
{STATE_SAMPLER(15), {STATE_VDECL}},
{STATE_SAMPLER(16), /* Vertex sampler 0 */ {STATE_VDECL}},
{STATE_SAMPLER(17), /* Vertex sampler 1 */ {STATE_VDECL}},
{STATE_SAMPLER(18), /* Vertex sampler 2 */ {STATE_VDECL}},
{STATE_SAMPLER(19), /* Vertex sampler 3 */ {STATE_VDECL}},
{STATE_BASEVERTEXINDEX, {STATE_VDECL}},
{STATE_FRAMEBUFFER, {STATE_VDECL}},
{STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL), {STATE_VDECL}},
{STATE_SHADER(WINED3D_SHADER_TYPE_HULL), {STATE_VDECL}},
{STATE_SHADER(WINED3D_SHADER_TYPE_DOMAIN), {STATE_VDECL}},
{STATE_SHADER(WINED3D_SHADER_TYPE_GEOMETRY), {STATE_VDECL}},
{STATE_SHADER(WINED3D_SHADER_TYPE_COMPUTE), {STATE_VDECL}},
{0}, /* Terminate */
};
static void adapter_no3d_destroy(struct wined3d_adapter *adapter)
{
wined3d_adapter_cleanup(adapter);
@ -2753,6 +2924,7 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal,
adapter->vertex_pipe = &none_vertex_pipe;
adapter->fragment_pipe = &none_fragment_pipe;
adapter->misc_state_template = misc_state_template_no3d;
adapter->shader_backend = &none_shader_backend;
wined3d_adapter_no3d_init_d3d_info(adapter, wined3d_creation_flags);

View File

@ -4577,7 +4577,7 @@ static void state_so_warn(struct wined3d_context *context, const struct wined3d_
WARN("Transform feedback not supported.\n");
}
const struct wined3d_state_entry_template misc_state_template[] =
const struct wined3d_state_entry_template misc_state_template_gl[] =
{
{ STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_VERTEX), { STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_VERTEX), state_cb, }, ARB_UNIFORM_BUFFER_OBJECT },
{ STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_VERTEX), { STATE_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_VERTEX), state_cb_warn, }, WINED3D_GL_EXT_NONE },

View File

@ -2378,7 +2378,7 @@ struct wined3d_vertex_pipe_ops
const struct wined3d_state_entry_template *vp_states;
};
extern const struct wined3d_state_entry_template misc_state_template[] DECLSPEC_HIDDEN;
extern const struct wined3d_state_entry_template misc_state_template_gl[] DECLSPEC_HIDDEN;
extern const struct wined3d_fragment_pipe_ops none_fragment_pipe DECLSPEC_HIDDEN;
extern const struct wined3d_fragment_pipe_ops ffp_fragment_pipeline DECLSPEC_HIDDEN;
extern const struct wined3d_fragment_pipe_ops atifs_fragment_pipeline DECLSPEC_HIDDEN;
@ -3037,6 +3037,7 @@ struct wined3d_adapter
const struct wined3d_vertex_pipe_ops *vertex_pipe;
const struct wined3d_fragment_pipe_ops *fragment_pipe;
const struct wined3d_state_entry_template *misc_state_template;
const struct wined3d_shader_backend_ops *shader_backend;
const struct wined3d_adapter_ops *adapter_ops;
};