[D3D12] Fix custom sample position reset

This commit is contained in:
Triang3l 2020-12-08 22:43:15 +03:00
parent b7216f91f7
commit 9349cf4ff4
1 changed files with 3 additions and 1 deletions

View File

@ -221,7 +221,9 @@ void DeferredCommandList::Execute(ID3D12GraphicsCommandList* command_list,
*reinterpret_cast<const D3DSetSamplePositionsArguments*>(stream);
command_list_1->SetSamplePositions(
args.num_samples_per_pixel, args.num_pixels,
const_cast<D3D12_SAMPLE_POSITION*>(args.sample_positions));
(args.num_samples_per_pixel && args.num_pixels)
? const_cast<D3D12_SAMPLE_POSITION*>(args.sample_positions)
: nullptr);
}
} break;
default: