mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01: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
|
|
@ -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…
Reference in a new issue