[PATCH 1/6] d3d11: Implement d3d11_immediate_context_IASetPrimitiveTopology().

Józef Kucia joseph.kucia at gmail.com
Tue Oct 13 19:25:51 CDT 2015


On Wed, Oct 14, 2015 at 2:08 AM, Józef Kucia <jkucia at codeweavers.com> wrote:
> Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
> ---
>  dlls/d3d11/device.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
> index 8a7a794..a06f3e6 100644
> --- a/dlls/d3d11/device.c
> +++ b/dlls/d3d11/device.c
> @@ -39,6 +39,12 @@ static inline struct d3d11_immediate_context *impl_from_ID3D11DeviceContext(ID3D
>      return CONTAINING_RECORD(iface, struct d3d11_immediate_context, ID3D11DeviceContext_iface);
>  }
>
> +static inline struct d3d_device *device_from_immediate_ID3D11DeviceContext(ID3D11DeviceContext *iface)
> +{
> +    struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext(iface);
> +    return CONTAINING_RECORD(context, struct d3d_device, immediate_context);
> +}
> +
>  static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_QueryInterface(ID3D11DeviceContext *iface,
>          REFIID riid, void **out)
>  {
> @@ -249,7 +255,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShader(ID3D11DeviceCo
>  static void STDMETHODCALLTYPE d3d11_immediate_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
>          D3D11_PRIMITIVE_TOPOLOGY topology)
>  {
> -    FIXME("iface %p, topology %u stub!\n", iface, topology);
> +    struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);

We could alternatively keep a pointer to d3d_device in
d3d_immediate_context instead of a pointer to ID3D11Device.



More information about the wine-devel mailing list