Add validation for constant buffer initialization and unit test
このコミットが含まれているのは:
1 親
b866572173
コミット
ec057ce7e4
3ファイル変更
+44
-2
検索条件に一致するファイルはありません
-1
@@ -200,7 +200,6 @@ partial struct PixelShaderEffect
|
||||
opaqueInputs[i] = inputOpaqueSubRects[i].ToRectangle();
|
||||
}
|
||||
|
||||
// TODO: shouldn't there be a check for the buffer being null?
|
||||
ReadOnlySpan<byte> buffer = new(@this->constantBuffer, @this->constantBufferSize);
|
||||
|
||||
Rectangle output;
|
||||
|
||||
+7
@@ -159,6 +159,13 @@ internal unsafe partial struct PixelShaderEffect
|
||||
{
|
||||
int hresult = S.S_OK;
|
||||
|
||||
// Validate the constant buffer
|
||||
if (@this->constantBufferSize > 0 &&
|
||||
@this->constantBuffer is null)
|
||||
{
|
||||
return E.E_NOT_VALID_STATE;
|
||||
}
|
||||
|
||||
// First, set the constant buffer, if available
|
||||
if (@this->constantBuffer is not null)
|
||||
{
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする