Nikolay Sivov : d3d10/effect: Extend sampler backing store with a texture field.
Alexandre Julliard
julliard at winehq.org
Tue Oct 5 15:51:40 CDT 2021
Module: wine
Branch: master
Commit: 42a6c1f7055bb1203622c8fa23e3294112989b8a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=42a6c1f7055bb1203622c8fa23e3294112989b8a
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Oct 4 14:48:48 2021 +0300
d3d10/effect: Extend sampler backing store with a texture field.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d10/d3d10_private.h | 8 +++++++-
dlls/d3d10/effect.c | 24 ++++++++++++------------
2 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h
index 31e38713c5f..1ebbbd11ea3 100644
--- a/dlls/d3d10/d3d10_private.h
+++ b/dlls/d3d10/d3d10_private.h
@@ -124,6 +124,12 @@ struct d3d10_effect_shader_variable
unsigned int isinline : 1;
};
+struct d3d10_effect_sampler_desc
+{
+ D3D10_SAMPLER_DESC desc;
+ struct d3d10_effect_variable *texture;
+};
+
struct d3d10_effect_state_object_variable
{
union
@@ -131,7 +137,7 @@ struct d3d10_effect_state_object_variable
D3D10_RASTERIZER_DESC rasterizer;
D3D10_DEPTH_STENCIL_DESC depth_stencil;
D3D10_BLEND_DESC blend;
- D3D10_SAMPLER_DESC sampler;
+ struct d3d10_effect_sampler_desc sampler;
} desc;
union
{
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 252e75f73bb..a62269f5b92 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -209,16 +209,16 @@ static const struct d3d10_effect_state_property_info property_info[] =
{0x2a, "BlendState.DestBlendAlpha", D3D10_SVT_INT, 1, 1, D3D10_C_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, DestBlendAlpha) },
{0x2b, "BlendState.BlendOpAlpha", D3D10_SVT_INT, 1, 1, D3D10_C_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, BlendOpAlpha) },
{0x2c, "BlendState.RenderTargetWriteMask", D3D10_SVT_UINT8, 1, 8, D3D10_C_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, RenderTargetWriteMask) },
- {0x2d, "SamplerState.Filter", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, Filter) },
- {0x2e, "SamplerState.AddressU", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, AddressU) },
- {0x2f, "SamplerState.AddressV", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, AddressV) },
- {0x30, "SamplerState.AddressW", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, AddressW) },
- {0x31, "SamplerState.MipMapLODBias", D3D10_SVT_FLOAT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, MipLODBias) },
- {0x32, "SamplerState.MaxAnisotropy", D3D10_SVT_UINT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, MaxAnisotropy) },
- {0x33, "SamplerState.ComparisonFunc", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, ComparisonFunc) },
- {0x34, "SamplerState.BorderColor", D3D10_SVT_FLOAT, 4, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, BorderColor) },
- {0x35, "SamplerState.MinLOD", D3D10_SVT_FLOAT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, MinLOD) },
- {0x36, "SamplerState.MaxLOD", D3D10_SVT_FLOAT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, MaxLOD) },
+ {0x2d, "SamplerState.Filter", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.Filter) },
+ {0x2e, "SamplerState.AddressU", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.AddressU) },
+ {0x2f, "SamplerState.AddressV", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.AddressV) },
+ {0x30, "SamplerState.AddressW", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.AddressW) },
+ {0x31, "SamplerState.MipLODBias", D3D10_SVT_FLOAT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.MipLODBias) },
+ {0x32, "SamplerState.MaxAnisotropy", D3D10_SVT_UINT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.MaxAnisotropy) },
+ {0x33, "SamplerState.ComparisonFunc", D3D10_SVT_INT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.ComparisonFunc) },
+ {0x34, "SamplerState.BorderColor", D3D10_SVT_FLOAT, 4, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.BorderColor) },
+ {0x35, "SamplerState.MinLOD", D3D10_SVT_FLOAT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.MinLOD) },
+ {0x36, "SamplerState.MaxLOD", D3D10_SVT_FLOAT, 1, 1, D3D10_C_SAMPLER, FIELD_OFFSET(struct d3d10_effect_sampler_desc, desc.MaxLOD) },
};
static const D3D10_RASTERIZER_DESC default_rasterizer_desc =
@@ -2159,7 +2159,7 @@ static HRESULT create_state_object(struct d3d10_effect_variable *v)
case D3D10_SVT_SAMPLER:
if (FAILED(hr = ID3D10Device_CreateSamplerState(device,
- &v->u.state.desc.sampler, &v->u.state.object.sampler)))
+ &v->u.state.desc.sampler.desc, &v->u.state.object.sampler)))
return hr;
break;
@@ -8302,7 +8302,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetBackingStore(I
return E_FAIL;
}
- *desc = v->u.state.desc.sampler;
+ *desc = v->u.state.desc.sampler.desc;
return S_OK;
}
More information about the wine-cvs
mailing list