=?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Fix shader constant byte calculation.
Alexandre Julliard
julliard at winehq.org
Wed Sep 26 14:06:50 CDT 2012
Module: wine
Branch: master
Commit: 3eb26010d8a1b350035dafeb47af4bdc1cc9766f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3eb26010d8a1b350035dafeb47af4bdc1cc9766f
Author: Rico Schüller <kgbricola at web.de>
Date: Wed Sep 26 12:21:54 2012 +0200
d3dx9: Fix shader constant byte calculation.
---
dlls/d3dx9_36/shader.c | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
index c62c8e5..dfa0488 100644
--- a/dlls/d3dx9_36/shader.c
+++ b/dlls/d3dx9_36/shader.c
@@ -671,15 +671,6 @@ static inline int is_vertex_shader(DWORD version)
return (version & 0xFFFF0000) == 0xFFFE0000;
}
-static DWORD calc_bytes(D3DXCONSTANT_DESC *desc)
-{
- if (desc->RegisterSet != D3DXRS_FLOAT4 && desc->RegisterSet != D3DXRS_SAMPLER)
- FIXME("Don't know how to calculate Bytes for constants of type %s\n",
- debug_d3dxparameter_registerset(desc->RegisterSet));
-
- return 4 * desc->Elements * desc->Rows * desc->Columns;
-}
-
static inline struct ctab_constant *constant_from_handle(D3DXHANDLE handle)
{
return (struct ctab_constant *)handle;
@@ -1656,7 +1647,7 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
}
constant->desc.RegisterCount = max(0, min(max - index, size));
- constant->desc.Bytes = calc_bytes(&constant->desc);
+ constant->desc.Bytes = 4 * constant->desc.Elements * type->Rows * type->Columns;
return D3D_OK;
More information about the wine-cvs
mailing list