#if API < 11
extern "C" HRESULT STDMETHODCALLTYPE D3D10CreateBlob(
- SIZE_T NumBytes,
- LPD3D10BLOB *ppBuffer
+ SIZE_T num_bytes,
+ LPD3D10BLOB *out_buffer
);
HRESULT STDMETHODCALLTYPE D3D10CreateBlob(
- SIZE_T NumBytes,
- LPD3D10BLOB *ppBuffer
+ SIZE_T num_bytes,
+ LPD3D10BLOB *out_buffer
)
{
- void* data = malloc(NumBytes);
+ void* data = malloc(num_bytes);
if(!data)
return E_OUTOFMEMORY;
- *ppBuffer = new GalliumD3DBlob(data, NumBytes);
+ *out_buffer = new GalliumD3DBlob(data, num_bytes);
return S_OK;
}
LPCSTR STDMETHODCALLTYPE D3D10GetPixelShaderProfile(
- ID3D10Device *pDevice
+ ID3D10Device *device
)
{
return "ps_4_0";
}
LPCSTR STDMETHODCALLTYPE D3D10GetVertexShaderProfile(
- ID3D10Device *pDevice
+ ID3D10Device *device
)
{
return "vs_4_0";
}
LPCSTR STDMETHODCALLTYPE D3D10GetGeometryShaderProfile(
- ID3D10Device *pDevice
+ ID3D10Device *device
)
{
return "gs_4_0";
}
HRESULT D3D10GetInputSignatureBlob(
- const void *pShaderBytecode,
- SIZE_T BytecodeLength,
- ID3D10Blob **ppSignatureBlob
+ const void *shader_bytecode,
+ SIZE_T bytecode_length,
+ ID3D10Blob **signature_blob
)
{
- dxbc_chunk_signature* sig = dxbc_find_signature(pShaderBytecode, BytecodeLength, false);
+ dxbc_chunk_signature* sig = dxbc_find_signature(shader_bytecode, bytecode_length, false);
if(!sig)
return E_FAIL;
- return dxbc_assemble_as_blob((dxbc_chunk_header**)&sig, 1, ppSignatureBlob);
+ return dxbc_assemble_as_blob((dxbc_chunk_header**)&sig, 1, signature_blob);
}
HRESULT D3D10GetOutputSignatureBlob(
- const void *pShaderBytecode,
- SIZE_T BytecodeLength,
- ID3D10Blob **ppSignatureBlob
+ const void *shader_bytecode,
+ SIZE_T bytecode_length,
+ ID3D10Blob **signature_blob
)
{
- dxbc_chunk_signature* sig = dxbc_find_signature(pShaderBytecode, BytecodeLength, true);
+ dxbc_chunk_signature* sig = dxbc_find_signature(shader_bytecode, bytecode_length, true);
if(!sig)
return E_FAIL;
- return dxbc_assemble_as_blob((dxbc_chunk_header**)&sig, 1, ppSignatureBlob);
+ return dxbc_assemble_as_blob((dxbc_chunk_header**)&sig, 1, signature_blob);
}
HRESULT D3D10GetInputAndOutputSignatureBlob(
- const void *pShaderBytecode,
- SIZE_T BytecodeLength,
- ID3D10Blob **ppSignatureBlob
+ const void *shader_bytecode,
+ SIZE_T bytecode_length,
+ ID3D10Blob **signature_blob
)
{
dxbc_chunk_signature* sigs[2];
- sigs[0] = dxbc_find_signature(pShaderBytecode, BytecodeLength, false);
+ sigs[0] = dxbc_find_signature(shader_bytecode, bytecode_length, false);
if(!sigs[0])
return E_FAIL;
- sigs[1] = dxbc_find_signature(pShaderBytecode, BytecodeLength, true);
+ sigs[1] = dxbc_find_signature(shader_bytecode, bytecode_length, true);
if(!sigs[1])
return E_FAIL;
- return dxbc_assemble_as_blob((dxbc_chunk_header**)&sigs, 2, ppSignatureBlob);
+ return dxbc_assemble_as_blob((dxbc_chunk_header**)&sigs, 2, signature_blob);
}
#endif
}
virtual void STDMETHODCALLTYPE GetDevice(
- ID3D11Device **ppDevice
+ ID3D11Device **out_device
)
{
device->AddRef();
- *ppDevice = device;
+ *out_device = device;
}
};
: GalliumD3D11Object<Base, Object>(device, object), desc(desc)
{}
- virtual void STDMETHODCALLTYPE GetDesc(Desc *pDesc)
+ virtual void STDMETHODCALLTYPE GetDesc(Desc *out_desc)
{
- memcpy(pDesc, &desc, sizeof(desc));
+ memcpy(out_desc, &desc, sizeof(desc));
}
};
: GalliumD3D10BlendStateBase(device, object, convert_to_d3d10(desc)), desc1(desc1)
{}
- virtual void STDMETHODCALLTYPE GetDesc1(D3D10_BLEND_DESC1 *pDesc)
+ virtual void STDMETHODCALLTYPE GetDesc1(D3D10_BLEND_DESC1 *out_desc)
{
- memcpy(pDesc, &desc1, sizeof(desc1));
+ memcpy(out_desc, &desc1, sizeof(desc1));
}
};
#endif
unsigned eviction_priority;
virtual void STDMETHODCALLTYPE SetEvictionPriority(
- unsigned EvictionPriority)
+ unsigned new_eviction_priority
+ )
{
- eviction_priority = EvictionPriority;
+ eviction_priority = new_eviction_priority;
}
virtual unsigned STDMETHODCALLTYPE GetEvictionPriority()
struct GalliumDXGIResource : public IDXGIResource
{
virtual HRESULT STDMETHODCALLTYPE SetEvictionPriority(
- unsigned EvictionPriority)
+ unsigned new_eviction_priority
+ )
{
- static_cast<Real*>(this)->eviction_priority = EvictionPriority;
+ static_cast<Real*>(this)->eviction_priority = new_eviction_priority;
return S_OK;
}
- virtual HRESULT STDMETHODCALLTYPE GetEvictionPriority(unsigned* pEvictionPriority)
+ virtual HRESULT STDMETHODCALLTYPE GetEvictionPriority(unsigned* out_eviction_priority)
{
- *pEvictionPriority = static_cast<Real*>(this)->eviction_priority;
- return S_OK;
+ *out_eviction_priority = static_cast<Real*>(this)->eviction_priority;
+ return S_OK;
}
virtual HRESULT STDMETHODCALLTYPE GetDevice(
REFIID riid,
- void **ppParent)
+ void **out_parent)
{
if(!static_cast<Real*>(this)->device)
return E_NOINTERFACE;
- return static_cast<Real*>(this)->device->QueryInterface(riid, ppParent);
+ return static_cast<Real*>(this)->device->QueryInterface(riid, out_parent);
}
virtual HRESULT STDMETHODCALLTYPE GetParent(
REFIID riid,
- void **ppParent)
+ void **out_parent)
{
if(!static_cast<Real*>(this)->device)
return E_NOINTERFACE;
- return static_cast<Real*>(this)->device->QueryInterface(riid, ppParent);
+ return static_cast<Real*>(this)->device->QueryInterface(riid, out_parent);
}
};
}
virtual HRESULT STDMETHODCALLTYPE GetUsage(
- DXGI_USAGE *pUsage
+ DXGI_USAGE *out_usage
)
{
- *pUsage = this->dxgi_usage;
+ *out_usage = this->dxgi_usage;
return S_OK;
}
- virtual HRESULT STDMETHODCALLTYPE GetSharedHandle(HANDLE *pSharedHandle)
+ virtual HRESULT STDMETHODCALLTYPE GetSharedHandle(HANDLE *out_shared_handle)
{
return E_NOTIMPL;
}
: GalliumD3D11Resource<Base>(device, resource, dxgi_usage), desc(desc)
{}
virtual void STDMETHODCALLTYPE GetType(
- D3D11_RESOURCE_DIMENSION *pResourceDimension)
+ D3D11_RESOURCE_DIMENSION *out_resource_dimension)
{
- *pResourceDimension = Dim;
+ *out_resource_dimension = Dim;
}
- virtual void STDMETHODCALLTYPE GetDesc(Desc *pDesc)
+ virtual void STDMETHODCALLTYPE GetDesc(Desc *out_desc)
{
- memcpy(pDesc, &desc, sizeof(desc));
+ memcpy(out_desc, &desc, sizeof(desc));
}
};
}
virtual HRESULT STDMETHODCALLTYPE Map(
- D3D10_MAP MapType,
- unsigned MapFlags,
- void **ppData)
+ D3D10_MAP map_type,
+ unsigned map_flags,
+ void **out_data)
{
D3D10_MAPPED_SUBRESOURCE msr;
- HRESULT hr = device->Map(this, 0, MapType, MapFlags, &msr);
+ HRESULT hr = device->Map(this, 0, map_type, map_flags, &msr);
if(!SUCCEEDED(hr))
return hr;
- *ppData = msr.pData;
+ *out_data = msr.pData;
return S_OK;
}
{}
virtual HRESULT STDMETHODCALLTYPE Map(
- unsigned Subresource,
- D3D10_MAP MapType,
- unsigned MapFlags,
- void **ppData)
+ unsigned subresource,
+ D3D10_MAP map_type,
+ unsigned map_flags,
+ void **out_data)
{
D3D10_MAPPED_SUBRESOURCE msr;
- HRESULT hr = device->Map(this, Subresource, MapType, MapFlags, &msr);
+ HRESULT hr = device->Map(this, subresource, map_type, map_flags, &msr);
if(!SUCCEEDED(hr))
return hr;
- *ppData = msr.pData;
+ *out_data = msr.pData;
return S_OK;
}
virtual void STDMETHODCALLTYPE Unmap(
- unsigned Subresource
+ unsigned subresource
)
{
- device->Unmap(this, Subresource);
+ device->Unmap(this, subresource);
}
};
{}
virtual HRESULT STDMETHODCALLTYPE Map(
- unsigned Subresource,
- D3D10_MAP MapType,
- unsigned MapFlags,
- D3D10_MAPPED_TEXTURE2D *pMappedTex2D)
+ unsigned subresource,
+ D3D10_MAP map_type,
+ unsigned map_flags,
+ D3D10_MAPPED_TEXTURE2D *out_mapped_subresource)
{
D3D10_MAPPED_SUBRESOURCE msr;
- HRESULT hr = device->Map(this, Subresource, MapType, MapFlags, &msr);
+ HRESULT hr = device->Map(this, subresource, map_type, map_flags, &msr);
if(!SUCCEEDED(hr))
return hr;
- pMappedTex2D->pData = msr.pData;
- pMappedTex2D->RowPitch = msr.RowPitch;
+ out_mapped_subresource->pData = msr.pData;
+ out_mapped_subresource->RowPitch = msr.RowPitch;
return S_OK;
}
virtual void STDMETHODCALLTYPE Unmap(
- unsigned Subresource
+ unsigned subresource
)
{
- device->Unmap(this, Subresource);
+ device->Unmap(this, subresource);
}
};
{}
virtual HRESULT STDMETHODCALLTYPE Map(
- unsigned Subresource,
- D3D10_MAP MapType,
- unsigned MapFlags,
- D3D10_MAPPED_TEXTURE3D *pMappedTex3D)
+ unsigned subresource,
+ D3D10_MAP map_type,
+ unsigned map_flags,
+ D3D10_MAPPED_TEXTURE3D *out_mapped_subresource)
{
D3D10_MAPPED_SUBRESOURCE msr;
- HRESULT hr = device->Map(this, Subresource, MapType, MapFlags, &msr);
+ HRESULT hr = device->Map(this, subresource, map_type, map_flags, &msr);
if(!SUCCEEDED(hr))
return hr;
- pMappedTex3D->pData = msr.pData;
- pMappedTex3D->RowPitch = msr.RowPitch;
- pMappedTex3D->DepthPitch = msr.DepthPitch;
+ out_mapped_subresource->pData = msr.pData;
+ out_mapped_subresource->RowPitch = msr.RowPitch;
+ out_mapped_subresource->DepthPitch = msr.DepthPitch;
return S_OK;
}
virtual void STDMETHODCALLTYPE Unmap(
- unsigned Subresource
+ unsigned subresource
)
{
- device->Unmap(this, Subresource);
+ device->Unmap(this, subresource);
}
};
#endif
}
virtual HRESULT STDMETHODCALLTYPE GetDesc(
- DXGI_SURFACE_DESC *pDesc)
+ DXGI_SURFACE_DESC *out_desc)
{
- pDesc->Format = this->desc.Format;
- pDesc->Width = this->desc.Width;
- pDesc->Height = this->desc.Height;
- pDesc->SampleDesc = this->desc.SampleDesc;
+ out_desc->Format = this->desc.Format;
+ out_desc->Width = this->desc.Width;
+ out_desc->Height = this->desc.Height;
+ out_desc->SampleDesc = this->desc.SampleDesc;
return S_OK;
}
virtual HRESULT STDMETHODCALLTYPE GetParent(
REFIID riid,
- void **ppParent)
+ void **out_parent)
{
if(!device)
return E_NOINTERFACE;
- return device->QueryInterface(riid, ppParent);
+ return device->QueryInterface(riid, out_parent);
}
/* TODO: somehow implement these */
virtual HRESULT STDMETHODCALLTYPE GetDC(
- BOOL Discard,
- HDC *phdc)
+ BOOL discard,
+ HDC *out_hdc)
{
- *phdc = 0;
+ *out_hdc = 0;
return E_NOTIMPL;
}
virtual HRESULT STDMETHODCALLTYPE ReleaseDC(
- RECT *pDirtyRect)
+ RECT *out_dirty_rect)
{
return E_NOTIMPL;
}
virtual HRESULT STDMETHODCALLTYPE Map(
- DXGI_MAPPED_RECT *pLockedRect,
- unsigned MapFlags)
+ DXGI_MAPPED_RECT *out_locked_rect,
+ unsigned map_flags)
{
D3D11_MAP d3d_map;
- if(MapFlags & DXGI_MAP_DISCARD)
+ if(map_flags & DXGI_MAP_DISCARD)
d3d_map = D3D11_MAP_WRITE_DISCARD;
else
{
- if(MapFlags & DXGI_MAP_READ)
+ if(map_flags & DXGI_MAP_READ)
{
- if(MapFlags & DXGI_MAP_WRITE)
+ if(map_flags & DXGI_MAP_WRITE)
d3d_map = D3D11_MAP_READ_WRITE;
else
d3d_map = D3D11_MAP_READ;
}
D3D11_MAPPED_SUBRESOURCE d3d_mapped;
HRESULT hres = this->device->get_immediate_context()->Map(this, 0, d3d_map, 0, &d3d_mapped);
- pLockedRect->pBits = (uint8_t*)d3d_mapped.pData;
- pLockedRect->Pitch = d3d_mapped.RowPitch;
+ out_locked_rect->pBits = (uint8_t*)d3d_mapped.pData;
+ out_locked_rect->Pitch = d3d_mapped.RowPitch;
return hres;
}
virtual HRESULT STDMETHODCALLTYPE GetDevice(
REFIID riid,
- void **ppParent)
+ void **out_parent)
{
if(!device)
return E_NOINTERFACE;
- return device->QueryInterface(riid, ppParent);
+ return device->QueryInterface(riid, out_parent);
}
};
resource->Release();
}
- virtual void STDMETHODCALLTYPE GetResource(ID3D11Resource** ppResource)
+ virtual void STDMETHODCALLTYPE GetResource(ID3D11Resource** out_resource)
{
resource->AddRef();
- *ppResource = resource;
+ *out_resource = resource;
}
};
: GalliumD3D10ShaderResourceViewBase(device, resource, view, desc)
{}
- virtual void STDMETHODCALLTYPE GetDesc1(D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc)
+ virtual void STDMETHODCALLTYPE GetDesc1(D3D10_SHADER_RESOURCE_VIEW_DESC1 *out_desc)
{
- memcpy(pDesc, &desc, sizeof(*pDesc));
+ memcpy(out_desc, &desc, sizeof(*out_desc));
}
- virtual void STDMETHODCALLTYPE GetDesc(D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc)
+ virtual void STDMETHODCALLTYPE GetDesc(D3D10_SHADER_RESOURCE_VIEW_DESC *out_desc)
{
- memcpy(pDesc, &desc, sizeof(*pDesc));
+ memcpy(out_desc, &desc, sizeof(*out_desc));
}
};
#endif
}
virtual HRESULT STDMETHODCALLTYPE GetData(
- void *pData,
- unsigned DataSize,
- unsigned GetDataFlags)
+ void * out_data,
+ unsigned data_size,
+ unsigned get_data_flags)
{
- return this->device->GetData(this, pData, DataSize, GetDataFlags);
+ return this->device->GetData(this, out_data, data_size, get_data_flags);
}
#endif
};
{}
virtual void STDMETHODCALLTYPE GetDesc(
- D3D11_QUERY_DESC *pDesc)
+ D3D11_QUERY_DESC *out_desc)
{
- *pDesc = desc;
+ *out_desc = desc;
}
};
{}
virtual void STDMETHODCALLTYPE GetDesc(
- D3D11_COUNTER_DESC *pDesc)
+ D3D11_COUNTER_DESC *out_desc)
{
- *pDesc = desc;
+ *out_desc = desc;
}
};