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