[PATCH 1/6] d3d11: Implement d3d11_immediate_context_IASetPrimitiveTopology().
joseph.kucia at gmail.com
Thu Oct 15 04:25:46 CDT 2015
On Thu, Oct 15, 2015 at 10:43 AM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 14 October 2015 at 02:25, Józef Kucia <joseph.kucia at gmail.com> wrote:
>> +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);
> It probably doesn't matter much in practice, but note that you can just do
> return CONTAINING_RECORD(iface, struct d3d_device,
>> We could alternatively keep a pointer to d3d_device in
>> d3d_immediate_context instead of a pointer to ID3D11Device.
> You don't really need either at this point. I.e., in e.g.
> d3d11_immediate_context_AddRef() you can just do
> device = device_from_immediate_ID3D11DeviceContext();
More information about the wine-devel