mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d11] Change ValidateBufferProperties to NormalizeBufferProperties
This commit is contained in:
parent
409991b9db
commit
762df0bedf
@ -181,8 +181,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Buffer::ValidateBufferProperties(
|
||||
const D3D11_BUFFER_DESC* pDesc) {
|
||||
HRESULT D3D11Buffer::NormalizeBufferProperties(D3D11_BUFFER_DESC* pDesc) {
|
||||
// Zero-sized buffers are illegal
|
||||
if (!pDesc->ByteWidth)
|
||||
return E_INVALIDARG;
|
||||
|
@ -113,13 +113,13 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Validates buffer description
|
||||
* \brief Normalizes buffer description
|
||||
*
|
||||
* \param [in] pDesc Buffer description
|
||||
* \returns \c S_OK if the parameters are valid
|
||||
*/
|
||||
static HRESULT ValidateBufferProperties(
|
||||
const D3D11_BUFFER_DESC* pDesc);
|
||||
static HRESULT NormalizeBufferProperties(
|
||||
D3D11_BUFFER_DESC* pDesc);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -81,7 +81,8 @@ namespace dxvk {
|
||||
if (!pDesc)
|
||||
return E_INVALIDARG;
|
||||
|
||||
HRESULT hr = D3D11Buffer::ValidateBufferProperties(pDesc);
|
||||
D3D11_BUFFER_DESC desc = *pDesc;
|
||||
HRESULT hr = D3D11Buffer::NormalizeBufferProperties(&desc);
|
||||
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
@ -90,9 +91,7 @@ namespace dxvk {
|
||||
return S_FALSE;
|
||||
|
||||
try {
|
||||
const Com<D3D11Buffer> buffer
|
||||
= new D3D11Buffer(this, pDesc);
|
||||
|
||||
const Com<D3D11Buffer> buffer = new D3D11Buffer(this, &desc);
|
||||
m_initializer->InitBuffer(buffer.ptr(), pInitialData);
|
||||
*ppBuffer = buffer.ref();
|
||||
return S_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user