X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=helpers%2Fd3dcommonsize.hpp;h=6619b13a683cefa0f3be96d898971d289b66d10e;hb=d6c02fd58feb2b48be13a2405d0eb738ed62925a;hp=b1f7b284d024001b83d444db5b00900fc98c4859;hpb=d5422a4b96d43614507df2bb0c248d04bbe6683a;p=apitrace diff --git a/helpers/d3dcommonsize.hpp b/helpers/d3dcommonsize.hpp index b1f7b28..6619b13 100644 --- a/helpers/d3dcommonsize.hpp +++ b/helpers/d3dcommonsize.hpp @@ -57,7 +57,7 @@ _vertexCount(D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount) case D3DPT_TRIANGLESTRIP: return PrimitiveCount + 2; case D3DPT_TRIANGLEFAN: - return PrimitiveCount + 1; + return PrimitiveCount + 2; default: os::log("apitrace: warning: %s: unknown D3DPRIMITIVETYPE %u\n", __FUNCTION__, PrimitiveType); return 0; @@ -106,10 +106,10 @@ _shaderSize(const DWORD *pFunction) break; case D3DSIO_END: - if (dwToken != D3DSIO_END) { - os::log("apitrace: warning: %s: malformed END token\n", __FUNCTION__); + if (dwToken == D3DSIO_END) { + return dwLength * sizeof *pFunction; } - return dwLength * sizeof *pFunction; + break; } } }