mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
d3d12: use memcpy instead of streamToBuffer for alpha settings
streamToBuffer doesn't work well for data < 128 bits
This commit is contained in:
parent
bf394d4f56
commit
91809c09d4
1 changed files with 2 additions and 2 deletions
|
@ -481,8 +481,8 @@ void D3D12GSRender::setScaleOffset()
|
|||
check(m_constantsData.m_heap->Map(0, &range, &scaleOffsetMap));
|
||||
streamToBuffer((char*)scaleOffsetMap + heapOffset, scaleOffsetMat, 16 * sizeof(float));
|
||||
int isAlphaTested = m_set_alpha_test;
|
||||
streamToBuffer((char*)scaleOffsetMap + heapOffset + 16 * sizeof(float), &isAlphaTested, sizeof(int));
|
||||
streamToBuffer((char*)scaleOffsetMap + heapOffset + 17 * sizeof(float), &m_alpha_ref, sizeof(float));
|
||||
memcpy((char*)scaleOffsetMap + heapOffset + 16 * sizeof(float), &isAlphaTested, sizeof(int));
|
||||
memcpy((char*)scaleOffsetMap + heapOffset + 17 * sizeof(float), &m_alpha_ref, sizeof(float));
|
||||
m_constantsData.m_heap->Unmap(0, &range);
|
||||
|
||||
D3D12_CONSTANT_BUFFER_VIEW_DESC constantBufferViewDesc = {};
|
||||
|
|
Loading…
Add table
Reference in a new issue