Am 20.09.2010 13:09, schrieb Henri Verbeet:
2010/9/19 Rico Schüllerkgbricola@web.de:
I don't think this makes a lot of sense. D3DGetDebugInfo() clearly doesn't return a DXBC, so I think you should just memcpy it into the blob directly instead of trying to abuse dxbc_write(). This change would also make it impossible to write any DXBC containing an SDBG chunk, like e.g. the one you'd be parsing for D3DGetDebugInfo().
D3DGetDebugInfo() (D3DGetBlobPart(D3D_BLOB_DEBUG_INFO)) isn't the only one which returns just the memory. There are other cases as well (e.g. D3D_BLOB_LEGACY_SHADER) which do the same stuff. It doesn't make it impossible to add a DXBC containing a SDBG chunk, it only avoids the case where you have only the SDBG without any other chunk (which is not a full DXBC). Please have a look at the patches attached to (http://www.winehq.org/pipermail/wine-devel/2010-September/086848.html).
Sure copying only the memory with a memcopy is a lot better.
Cheers Rico