mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
DX11: Introduce a D3DBlob class.
Advantages: - easier to use - drops our dependence on d3d10.lib, without depending on the June 2010 DX SDK - makes finding unreleased buffers easier - possibly more ;P git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5728 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
b63e15e412
commit
4f339ebc82
11 changed files with 181 additions and 72 deletions
|
@ -237,7 +237,7 @@ bool PixelShaderCache::SetShader(bool dstAlpha)
|
|||
// need to compile a new shader
|
||||
const char* code = GeneratePixelShaderCode(PixelShaderManager::GetTextureMask(), dstAlpha, API_D3D11);
|
||||
|
||||
ID3D10Blob* pbytecode;
|
||||
D3DBlob* pbytecode;
|
||||
if (!D3D::CompilePixelShader(code, strlen(code), &pbytecode))
|
||||
{
|
||||
PanicAlert("Failed to compile Pixel Shader:\n\n%s", code);
|
||||
|
@ -245,10 +245,10 @@ bool PixelShaderCache::SetShader(bool dstAlpha)
|
|||
}
|
||||
|
||||
// insert the bytecode into the caches
|
||||
g_ps_disk_cache.Append((u8*)&uid, sizeof(uid), (const u8*)pbytecode->GetBufferPointer(), pbytecode->GetBufferSize());
|
||||
g_ps_disk_cache.Append((u8*)&uid, sizeof(uid), (const u8*)pbytecode->Data(), pbytecode->Size());
|
||||
g_ps_disk_cache.Sync();
|
||||
|
||||
bool result = InsertByteCode(uid, pbytecode->GetBufferPointer(), pbytecode->GetBufferSize());
|
||||
bool result = InsertByteCode(uid, pbytecode->Data(), pbytecode->Size());
|
||||
D3D::gfxstate->SetPShader(last_entry->shader);
|
||||
pbytecode->Release();
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue