Re: [PATCH] d3dx9: Move object initialization into a separate function.

2013-10-09 Thread Matteo Bruni
2013/10/9 Rico Schüller kgbric...@web.de: On 09.10.2013 01:12, Matteo Bruni wrote: Hi Rico, 2013/10/8 Rico Schüller kgbric...@web.de: Hi, this moves the object initialization into a separate function, so it could be used for strings and resources. It also removes the STATE_TYPE as we

Re: [PATCH] d3dx9: Move object initialization into a separate function.

2013-10-08 Thread Matteo Bruni
Hi Rico, 2013/10/8 Rico Schüller kgbric...@web.de: Hi, this moves the object initialization into a separate function, so it could be used for strings and resources. It also removes the STATE_TYPE as we could distinguish the types at the object level. 1. When an object has a destination, it

Re: [PATCH] d3dx9: Use struct d3dx_object for objects.

2013-09-25 Thread Matteo Bruni
2013/9/24 Rico Schüller kgbric...@web.de: --- dlls/d3dx9_36/effect.c | 248 +++-- 1 Datei geändert, 95 Zeilen hinzugefügt(+), 153 Zeilen entfernt(-) I definitely like the direction this patch takes. @@ -5068,6 +5009,9 @@ static HRESULT

Re: [PATCH] wined3d: Fix per-stage constant in GLSL fixed function pipeline + add tests. (try 2)

2013-09-04 Thread Matteo Bruni
and updated when needed. Tests are also added. Thanks to Matteo Bruni for review and support. Try 2: - update with latest git Hi, I have a few small nits still, please bear with me... --- dlls/d3d9/tests/visual.c | 80 dlls/wined3d/glsl_shader.c

Re: [PATCH 1/5] d3d8/tests: Add cnd instruction test.

2013-09-03 Thread Matteo Bruni
2013/9/3 Henri Verbeet hverb...@gmail.com: On 2 September 2013 23:04, Matteo Bruni mbr...@codeweavers.com wrote: +float quad1[] = { +-1.0, -1.0, 0.1, 0.0,0.0,1.0, + 0.0, -1.0, 0.1, 1.0,0.0,1.0, +-1.0,0.0, 0.1, 0.0,1.0

Re: [PATCH 2/7] wined3d: Use PBOs for dynamic volumes (try 2)

2013-08-26 Thread Matteo Bruni
2013/8/26 Stefan Dösinger ste...@codeweavers.com: Try 2: *) Require only GPU access for buffers *) Reduce number of checkGLcall invocations *) Remove a return from an ERR case --- dlls/wined3d/utils.c | 1 + dlls/wined3d/volume.c | 168

Re: [PATCH 4/5] d3dx9/tests: Add ID3DXConstantTable struct test.

2013-08-02 Thread Matteo Bruni
2013/8/1 Matteo Bruni matteo.myst...@gmail.com: Instead of generating an entry for the struct with the correct members, the compiler generates TWO entries for sbnf, one with all its fields in D3DXRS_FLOAT4 and the other with D3DXRS_BOOL. Which, if I'm reading this correctly, makes 0 sense

Re: [PATCH 4/5] d3dx9/tests: Add ID3DXConstantTable struct test.

2013-08-01 Thread Matteo Bruni
2013/8/1 Rico Schüller kgbric...@web.de: On 31.07.2013 00:14, Matteo Bruni wrote: 2013/7/30 Rico Schüller kgbric...@web.de: Hi Matteo, please see the attached patch. On 25.07.2013 16:13, Matteo Bruni wrote: 2013/7/24 Rico Schüller kgbric...@web.de: --- dlls/d3dx9_36/tests

Re: d3dx9 [patch 1/2]: Implement D3DXCreatePolygon

2013-08-01 Thread Matteo Bruni
2013/8/1 Nozomi Kodama nozomi.kod...@yahoo.com: +vertices = HeapAlloc(GetProcessHeap(), 0, 2 * (sides + 1) * sizeof(D3DXVECTOR3)); +if (!vertices) +{ +TRACE(Not memory enough for vertex buffer\n); +polygon-lpVtbl-Release(polygon); +return E_OUTOFMEMORY; +}

Re: [PATCH 4/5] d3dx9/tests: Add ID3DXConstantTable struct test.

2013-07-30 Thread Matteo Bruni
2013/7/30 Rico Schüller kgbric...@web.de: Hi Matteo, please see the attached patch. On 25.07.2013 16:13, Matteo Bruni wrote: 2013/7/24 Rico Schüller kgbric...@web.de: --- dlls/d3dx9_36/tests/shader.c | 308 +++ 1 file changed, 308 insertions

Re: [1/1] kernel32: Implemented basic NUMA functions to replace the stubs

2013-07-29 Thread Matteo Bruni
2013/7/29 Chris Moeller kod...@gmail.com: without looking very deeply into the CRT source code. You're talking about MS source code, right? That makes you tainted for contributing to Wine at the very least for C runtime-related code :( If you haven't looked into any other source code, this patch

Re: [1/1] kernel32: Implemented basic NUMA functions to replace the stubs

2013-07-29 Thread Matteo Bruni
2013/7/30 Chris Moeller kod...@gmail.com: On Jul 29, 2013, at 11:22 AM, Matteo Bruni matteo.myst...@gmail.com wrote: 2013/7/29 Chris Moeller kod...@gmail.com: without looking very deeply into the CRT source code. You're talking about MS source code, right? That makes you tainted

Re: [PATCH 4/5] d3dx9/tests: Add ID3DXConstantTable struct test.

2013-07-25 Thread Matteo Bruni
2013/7/24 Rico Schüller kgbric...@web.de: --- dlls/d3dx9_36/tests/shader.c | 308 +++ 1 file changed, 308 insertions(+) This is okay, but as a followup can you add some tests with mixed-type structs? Something like: struct { float f; int i;

Re: [PATCH 3/5] d3dx9: Add support for structs to ID3DXConstantTable.

2013-07-25 Thread Matteo Bruni
2013/7/24 Rico Schüller kgbric...@web.de: --- dlls/d3dx9_36/shader.c | 79 -- 1 file changed, 77 insertions(+), 2 deletions(-) So there was actually a logic (an insane one, but yeah...). Have you found any game actually using this? Annoying

Re: [PATCH] wined3d: Implement per-stage constant in glsl fixed fonction pipeline.

2013-06-24 Thread Matteo Bruni
2013/6/24 Christian Costa titan.co...@gmail.com: Le 24/06/2013 09:24, Henri Verbeet a écrit : On 23 June 2013 21:57, Christian Costa titan.co...@gmail.com wrote: When D3DTA_CONSTANT is use in a texture stage, the generated shader uses variables that are not defined making thus the

Re: po: Update Italian translation (try 3)

2013-06-19 Thread Matteo Bruni
2013/6/17 Fabian Ebner f.ebne...@gmail.com: Typo fixed (finally) --- po/it.po | 40 ++-- 1 file changed, 14 insertions(+), 26 deletions(-) This one looks good to me, thanks :)

Re: Update Italian translation

2013-06-17 Thread Matteo Bruni
2013/6/16 Fabian Ebner f.ebne...@gmail.com: --- po/it.po | 40 ++-- 1 file changed, 14 insertions(+), 26 deletions(-) #: joy.rc:42 msgid After disabling or enabling a device, the connected joysticks won't be updated here until you restart this

Re: po: Update Italian translation (try 2)

2013-06-17 Thread Matteo Bruni
2013/6/17 Fabian Ebner f.ebne...@gmail.com: Fixed a typo and a sentence, thanks to Matteo --- po/it.po | 40 ++-- 1 file changed, 14 insertions(+), 26 deletions(-) #: jscript.rc:39 msgid 'return' statement outside of function -msgstr +msgstr Istruzione

Re: [PATCH] d3dx9_36: Implement D3DXGetShaderInputSemantics + tests.

2013-06-12 Thread Matteo Bruni
2013/6/12 Christian Costa titan.co...@gmail.com: +HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count) +{ +const DWORD *ptr = byte_code; +UINT i = 0; + +TRACE(byte_code = %p, semantics = %p, count = %p\n, byte_code,

Re: [PATCH] d3dx9_36: Implement D3DXGetShaderInputSemantics + tests.

2013-06-11 Thread Matteo Bruni
ptr ptr) @ stdcall D3DXGetShaderSize(ptr) diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index 75bc9b5..3b71b4b 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -1,6 +1,7 @@ /* * Copyright 2008 Luis Busquets * Copyright 2009 Matteo Bruni + * Copyright

Re: [PATCH] d3dcompiler: Add a LUT to find compilation targets info.

2013-05-03 Thread Matteo Bruni
2013/5/2 Christian Costa titan.co...@gmail.com: --- dlls/d3dcompiler_43/compiler.c| 101 +++-- dlls/d3dcompiler_43/d3dcompiler_private.h |1 2 files changed, 81 insertions(+), 21 deletions(-) diff --git a/dlls/d3dcompiler_43/compiler.c

Re: [PATCH 4/4] d3dx9_36: Remove todo in tests as it works now with last d3dxof fixes.

2013-04-30 Thread Matteo Bruni
2013/4/29 Christian Costa titan.co...@gmail.com: --- dlls/d3dx9_36/tests/xfile.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/tests/xfile.c b/dlls/d3dx9_36/tests/xfile.c index 1238bcd..e514a5f 100644 --- a/dlls/d3dx9_36/tests/xfile.c +++

Re: [PATCH 1/2] wined3d: Set GL_NONE for glReadBuffer / glDrawBuffer on FBO initialization.

2013-04-25 Thread Matteo Bruni
2013/4/25 Henri Verbeet hverb...@gmail.com: Seems ok, though a small comment explaining the issue this patch fixes probably wouldn't hurt. A comment in the commit message or in the code? On 25 April 2013 20:43, Matteo Bruni mbr...@codeweavers.com wrote: +if (target

Re: [PATCH 2/7] wined3d: Use ARB_internalformat_query2 to check for texture format rendering and blending support, where available.

2013-04-19 Thread Matteo Bruni
Hrm, I sent the wrong version of the patch, I had actually moved the depth/stencil check earlier (so yeah, totally agree on that part). Also you're right about WINED3DFMT_FLAG_RENDERTARGET, for some reason I thought we were setting that in check_fbo_compat() but it's clearly not the case. I'm

Re: d3dx9: Implement D3DXSHMultilpy5

2013-04-16 Thread Matteo Bruni
2013/4/15 Nozomi Kodama nozomi.kod...@yahoo.com: Hello thanks for the review. I don't think that calling defines is the way to go. Indeed, I tested my patch and yours. Yours is about 12% slower than mine in my computer. And now, we try to take care of efficiency of this dll. So, it is not

Re: [PATCH 8/8] wined3d: Skip non-textureable formats in check_fbo_compat().

2013-04-10 Thread Matteo Bruni
2013/4/10 Henri Verbeet hverb...@gmail.com: On 10 April 2013 01:35, Matteo Bruni mbr...@codeweavers.com wrote: --- dlls/wined3d/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index da8fc7b..5010676 100644 --- a/dlls/wined3d

Re: [PATCH 1/8] wined3d: Remove useless glClearxxx calls.

2013-04-10 Thread Matteo Bruni
2013/4/10 Henri Verbeet hverb...@gmail.com: On 10 April 2013 01:35, Matteo Bruni mbr...@codeweavers.com wrote: -/* Clear the screen */ -gl_info-gl_ops.gl.p_glClearColor(1.0f, 0.0f, 0.0f, 0.0f); -checkGLcall(glClearColor); -gl_info-gl_ops.gl.p_glClearIndex(0); -gl_info

Re: [PATCH 1/2] wined3d: Handle texture types via ps/vs_compile_args

2013-04-10 Thread Matteo Bruni
I guess it depends on what happens in D3D when the sampler type declared in the shader and the type of the texture bound to that sampler disagree, and it really matters only if all the current drivers have the same behavior in that regard. unbound_sampler_test() doesn't check what happens with

Re: [PATCH 8/8] wined3d: Skip non-textureable formats in check_fbo_compat().

2013-04-10 Thread Matteo Bruni
2013/4/10 Henri Verbeet hverb...@gmail.com: On 10 April 2013 17:53, Matteo Bruni matteo.myst...@gmail.com wrote: The idea is that, since check_fbo_compat() creates a texture of the specified format to attach it to a test FBO and verify that it works correctly, it doesn't make sense to even try

Re: d3dx9 [patch 1/2, resend]: Floatify fabs into fabs

2013-04-08 Thread Matteo Bruni
2013/4/7 Nozomi Kodama nozomi.kod...@yahoo.com: Both patches are fine for me (note that the email subject is missing an f but the actual patch has the correct title).

Re: d3dx9 [patch1/3, try 2]: Do not use relative error for small numbers

2013-04-02 Thread Matteo Bruni
2013/4/1 Nozomi Kodama nozomi.kod...@yahoo.com Since there are only at most 7 significant digits for a float, we must not be too picky about the expected difference for small numbers -#define relative_error(exp, out) ((exp == 0.0f) ? fabs(exp - out) : (fabs(1.0f - (out) / (exp

Re: d3dx9 [patch 1/2, try 3]: Implement D3DXSHEvalSphericalLight

2013-03-15 Thread Matteo Bruni
2013/3/15 Nozomi Kodama nozomi.kod...@yahoo.com: Patch series is fine to me.

Re: d3dx9 [patch 1/2]: Implement D3DXSHEvalSphericalLight

2013-03-14 Thread Matteo Bruni
2013/3/14 Nozomi Kodama nozomi.kod...@yahoo.com: No news about these patches? Nozomi? Hmm, I was under the impression that these patches were already picked up in git, but I see I was mistaken. Anyway they look okay to me, except for a bit in the tests from the first patch that I noticed

Re: d3dx9 [patch 1/2, try 3]: Implement D3DXSHEvalConeLight

2013-03-07 Thread Matteo Bruni
2013/3/6 Nozomi Kodama nozomi.kod...@yahoo.com: hello Still problems with this patch? Nozomi. FWIW, both patches are fine to me.

Re: d3dx9 [patch 1/2]: Implement D3DXSHEvalConeLight

2013-03-01 Thread Matteo Bruni
2013/3/1 Nozomi Kodama nozomi.kod...@yahoo.com: Why is this patch marked as not applied by the testbot? In my computer, with the latest git, it applies fine. Is there a problem with testbot? Nozomi Yeah, the old testbot has some issues. FWIW the patches applied just fine for me. Now, I

Re: d3dx9: Avoid expensive computations

2013-02-27 Thread Matteo Bruni
2013/2/26 Rico Schüller kgbric...@web.de: Hi Nozomi, this is pretty fast. Just some numbers (run time on my machine, so it might not be that representative)... before: 43s previous patch: 27s this patch: 21s native: 16s So from the speed point of view, it's a lot closer than the rest.

Re: [PATCH 1/2] wined3d: Make (wined3d_)surface_depth_blt_fbo handle locations other than SFLAG_INTEXTURE.

2013-02-17 Thread Matteo Bruni
2013/2/17 Henri Verbeet hverb...@gmail.com: On 17 February 2013 18:10, Matteo Bruni mbr...@codeweavers.com wrote: @@ -6168,18 +6172,10 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location, c if (surface-resource.usage WINED3DUSAGE_DEPTHSTENCIL

Re: d3dx9: Implement D3DXSHEvalConeLight

2013-02-12 Thread Matteo Bruni
Hi, in addition to what I already told you in #winehackers (that is, please rename the test struct field red_in to red_out and red_out to red_expected, or something like that), you should take the chance to do some more cleanup. That means e.g. use const instead of CONST as Rico already suggested

Re: wined3d: Rebind texture before checking for its content in check_fbo_compat().

2013-01-26 Thread Matteo Bruni
2013/1/26 Stefan Dösinger stefandoesin...@gmail.com: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 2013-01-26 22:32, schrieb Matteo Bruni: + gl_info-fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0); Do you really have to re-attach it to the FBO

Re: [PATCH 3/3] d3dx9: Use all 32 bits as mask.

2013-01-10 Thread Matteo Bruni
2013/1/10 Rico Schüller kgbric...@web.de: --- dlls/d3dx9_36/texture.c | 6 +++--- 1 Datei geändert, 3 Zeilen hinzugefügt(+), 3 Zeilen entfernt(- -DWORD i, v; +DWORD i, v, mask32 = format-bits[c] == 32 ? -1 : ((1 format-bits[c]) - 1); Usually we prefer to use ~0U instead

Re: [PATCH 1/7] d3dx9: Handle invalid byte code in D3DXFindShaderComment().

2013-01-02 Thread Matteo Bruni
2013/1/1 Rico Schüller kgbric...@web.de: --- dlls/d3dx9_36/shader.c | 16 +++- dlls/d3dx9_36/tests/shader.c | 21 + 2 Dateien geändert, 32 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-) +static inline BOOL is_valid_bytecode(DWORD token) +{ +token =

Re: d3dcompiler_43: Avoid signed-unsigned integer comparisons

2013-01-02 Thread Matteo Bruni
2013/1/1 Andrew Talbot andrew.tal...@talbotville.com: Changelog: d3dcompiler_43: Avoid signed-unsigned integer comparisons. diff --git a/dlls/d3dcompiler_43/bytecodewriter.c b/dlls/d3dcompiler_43/bytecodewriter.c index d10f6bc..17289d2 100644 --- a/dlls/d3dcompiler_43/bytecodewriter.c

Re: [PATCH] d3dx9_36/tests: Fix broken line test

2012-11-27 Thread Matteo Bruni
2012/11/27 Detlef Riekenberg wine@web.de: While inspecting a test failure, i found only 3 possible results for the line test: - d3dx9_36.dll not present - all tests skipped line.c:146: Tests skipped: Failed to create IDirect3DDevice9 object 0x8876086c - refcount test failed

Re: ntdll: Fixed some heap allocation stalls

2012-11-03 Thread Matteo Bruni
2012/11/2 Steaphan Greene steap...@gmail.com: Running a game in wine showed it performing terribly. I traced this to the fact that it allocates and deallocates tiny memory chunks over and over (I suspect it's in C++ and passing things by value everywhere). This led to huge stalls because the

Re: ntdll: Fixed some heap allocation stalls

2012-11-03 Thread Matteo Bruni
2012/11/3 Steaphan Greene steap...@gmail.com: On 11/03/2012 09:04 AM, Matteo Bruni wrote: 2012/11/2 Steaphan Greenesteap...@gmail.com: Running a game in wine showed it performing terribly. I traced this to the fact that it allocates and deallocates tiny memory chunks over and over (I

Re: [3/5] d3dx9: Introduce a function for copying pixels.

2012-10-29 Thread Matteo Bruni
2012/10/29 Christian Costa titan.co...@gmail.com: pixel_format = get_format_info(src_desc.Format); -if (pixel_format-type != FORMAT_ARGB) -{ -FIXME(Unsupported pixel format %#x\n, src_desc.Format); -return E_NOTIMPL; -} +if (pixel_format-type ==

Re: [PATCH 3/5] wined3d: Implement WINED3DSIH_ROUND_NI in the GLSL shader backend.

2012-10-19 Thread Matteo Bruni
2012/10/18 Henri Verbeet hverb...@codeweavers.com: --- dlls/wined3d/glsl_shader.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 57119e1..993b547 100644 --- a/dlls/wined3d/glsl_shader.c +++

Re: [PATCH 3/5] wined3d: Implement WINED3DSIH_ROUND_NI in the GLSL shader backend.

2012-10-19 Thread Matteo Bruni
2012/10/19 Henri Verbeet hverb...@gmail.com: On 19 October 2012 15:20, Matteo Bruni matteo.myst...@gmail.com wrote: 2012/10/18 Henri Verbeet hverb...@codeweavers.com: --- dlls/wined3d/glsl_shader.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d

Re: [PATCH 2/6] d3dcompiler: Improve a Nvidia GPU recognition fallback.

2012-10-16 Thread Matteo Bruni
Ehh, this patch should have been called something like wined3d: Improve a Nvidia GPU recognition fallback., but well...

Re: d3dx9_36 [try 3]: Implement D3DXSHRotate

2012-09-04 Thread Matteo Bruni
2012/9/4 Rico Schüller kgbric...@web.de: On 04.09.2012 13:19, Nozomi Kodama wrote: +FLOAT expected, in[100], out[100], ... +for (i = 0; i 49; i++) +in[i] = i + 1.01f; I guess this belongs together. I'd like to make some suggestions, please don't take it personally. When

Re: wined3d: Use backup swapchain DC for devices created with desktop window.

2012-09-03 Thread Matteo Bruni
2012/9/3 Henri Verbeet hverb...@gmail.com: On 3 September 2012 00:51, Adam Jakubek ajaku...@gmail.com wrote: Hi, This patch causes wined3d to use backup swapchain DC when IDirect3DDevice9 is created using the desktop window. Windows allows to create such device as long its type is

Re: [PATCH 4/4] wined3d: Improve post-pixelshader blending test. (Try 2)

2012-08-20 Thread Matteo Bruni
: http://dl.dropbox.com/u/2701879/images/rayman2.png Regression test: a488e574497d674631b4036d4b179ce349ddb764 is the first bad commit commit a488e574497d674631b4036d4b179ce349ddb764 Author: Matteo Bruni mbr...@codeweavers.com Date: Wed Aug 15 00:38:26 2012 +0200 wined3d: Improve post

Re: d3dx9_36: Implementation of D3DXSHRotateZ

2012-07-18 Thread Matteo Bruni
2012/7/18 Nozomi Kodama nozomi.kod...@yahoo.com: Minor nitpicks, but nevertheless: -@ stub D3DXSHRotateZ(ptr long long ptr) +@ stdcall D3DXSHRotateZ(ptr long long ptr) ... +FLOAT* WINAPI D3DXSHRotateZ(FLOAT *out, UINT order, FLOAT angle, CONST FLOAT *in) I guess using float in the spec

Re: [PATCH 5/5] d3dcompiler: Implement basic expressions parsing.

2012-07-17 Thread Matteo Bruni
2012/7/17 Stefan Dösinger stefandoesin...@gmx.at: Am Montag, 16. Juli 2012, 20:39:23 schrieb Matteo Bruni: +HLSL_IR_BINOP_MUL, ... +HLSL_IR_BINOP_DOT, HLSL has 3 somewhat related multiplication operations: *, mul and dot. Dot is fairly straightforward, but * and mul have subtle

Re: [PATCH 3/4] d3dx9/tests: Add effect parameter value GetMatrixPointerArray() test.

2012-07-09 Thread Matteo Bruni
2012/7/8 Rico Schüller kgbric...@web.de: --- dlls/d3dx9_36/tests/effect.c | 90 ++ 1 files changed, 90 insertions(+), 0 deletions(-) Hi Rico, maybe it's just me misunderstanding this, but: +FLOAT fvalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE]; +

Re: [1/5] d3dx9: Implement D3DXLoadVolumeFromMemory.

2012-06-28 Thread Matteo Bruni
2012/6/27 Józef Kucia joseph.ku...@gmail.com: --- Hi Józef, +void copy_simple_data(const BYTE *src, UINT srcpitch, SIZE src_size, const PixelFormatDesc *srcformat, +BYTE *dest, UINT destpitch, SIZE dst_size, const PixelFormatDesc *destformat, D3DCOLOR colorkey) DECLSPEC_HIDDEN; +

Re: [4/5] d3dx9: Implement D3DXCreateVolumeTextureFromFileInMemoryEx.

2012-06-28 Thread Matteo Bruni
2012/6/27 Józef Kucia joseph.ku...@gmail.com: --- +    for (mip_level = 0; mip_level mip_levels; mip_level++) +    { +        hr = calculate_dds_surface_size(src_info, width, height, src_pitch, mip_level_size); +        if (FAILED(hr)) return hr; ... +        hr =

Re: d3dx9_36 [patch 2 of 3]: Implementation of D3DXSHScale

2012-06-27 Thread Matteo Bruni
2012/6/27 Nozomi Kodama nozomi.kod...@yahoo.com: -@ stub D3DXSHScale(ptr long ptr ptr) +@ stdcall D3DXSHScale(ptr long ptr ptr) ... +FLOAT* WINAPI D3DXSHScale(FLOAT *out, UINT order, CONST FLOAT *a, CONST FLOAT scale) The last parameter doesn't match between the function prototype and the spec

Re: d3dx9_36 [patch 1of 2]: Implementation of D3DXSHDot

2012-06-19 Thread Matteo Bruni
2012/6/19 Nozomi Kodama nozomi.kod...@yahoo.com: +static void test_D3DXSHDot(void) +{ +unsigned int i; +FLOAT a[90], b[90], got; +CONST FLOAT expected[] = +{ 0.0f, 0.0f, 17.0f, 222.0f, 1300.0f, 5050.0f, 15225.0f, 38612.0f, 86352.0f, 175500.0f, }; + +for (i = 0; i 90; i++) +

Re: Re : d3dx9_36: D3DXQuaternionLn computes as if the norm of the input is 1

2012-06-13 Thread Matteo Bruni
2012/6/13 Nozomi Kodama nozomi.kod...@yahoo.com: 2012/6/12 Nozomi Kodama nozomi.kod...@yahoo.com: +    if ( (pq-w = 1.0f) || (pq-w == -1.0f) ) I think the second comparison should be '=', if you want to avoid getting NaNs. I checked in Vista.  D3DX accepts -1.0f as input and returns what the

Re: d3dx9_36: D3DXQuaternionLn computes as if the norm of the input is 1

2012-06-12 Thread Matteo Bruni
2012/6/12 Nozomi Kodama nozomi.kod...@yahoo.com: +if ( (pq-w = 1.0f) || (pq-w == -1.0f) ) I think the second comparison should be '=', if you want to avoid getting NaNs.

Re: po: Update Italian translation

2012-06-11 Thread Matteo Bruni
Hi Luca, just a couple of nitpicks: -Nota: è raccomandato usare i pacchetti delle distribuzioni. Leggi a href= -\http://wiki.winehq.org/Gecko\;http://wiki.winehq.org/Gecko/a per i -dettagli. +Nota: è raccomandato usare i pacchetti delle distribuzioni. Leggi a

Re: [PATCH 5/5] d3dcompiler: Parse variable declarations.

2012-06-05 Thread Matteo Bruni
2012/6/5 Stefan Dösinger stefandoesin...@gmx.at: Am Montag, 4. Juni 2012, 17:58:24 schrieb Matteo Bruni: +struct hlsl_type +{ ... +    unsigned int dimx; +    unsigned int dimy; ... +}; One thing I noticed when I wrote my compiler was that a float1x1 is not the same as a float1 or float

Re: [PATCH 5/5] d3dcompiler: Parse variable declarations.

2012-06-05 Thread Matteo Bruni
2012/6/5 Rico Schüller kgbric...@web.de: Am 05.06.2012 13:08, schrieb Matteo Bruni: 2012/6/5 Stefan Dösingerstefandoesin...@gmx.at: Am Montag, 4. Juni 2012, 17:58:24 schrieb Matteo Bruni: +struct hlsl_type +{ ... +    unsigned int dimx; +    unsigned int dimy; ... +}; One thing I

Re: [PATCH 5/5] d3dcompiler: Parse variable declarations.

2012-06-05 Thread Matteo Bruni
2012/6/5 Matteo Bruni matteo.myst...@gmail.com: 2012/6/5 Rico Schüller kgbric...@web.de: Am 05.06.2012 13:08, schrieb Matteo Bruni: 2012/6/5 Stefan Dösingerstefandoesin...@gmx.at: Am Montag, 4. Juni 2012, 17:58:24 schrieb Matteo Bruni: +struct hlsl_type +{ ... +    unsigned int dimx

Re: ddraw: Forward AddAttachedSurface to the correct equivalent

2012-05-14 Thread Matteo Bruni
2012/5/14 Stefan Dösinger stefandoesin...@gmx.at: Am Sonntag, 13. Mai 2012, 20:39:27 schrieb David Adam: +    hr = ddraw_surface3_AddAttachedSurface(This- IDirectDrawSurface3_iface, +            attachment_impl ? attachment_impl-IDirectDrawSurface3_iface : NULL); It isn't immediately clear to

Re: [2/8] d3dx9: Check the size of a DDS file in D3DXGetImageInfoFromFileInMemory.

2012-05-10 Thread Matteo Bruni
2012/5/9 Józef Kucia joseph.ku...@gmail.com: +static HRESULT get_image_info_from_dds(const void *buffer, UINT length, D3DXIMAGE_INFO *info)  { +   UINT i; +   UINT faces = 0; ... +   /* calculate the expected length */ +   width = info-Width; +   height = info-Height; +   for (i = 0; i

Re: [4/8] d3dx9: Implement D3DXCreateCubeTextureFromFileInMemoryEx.

2012-05-10 Thread Matteo Bruni
2012/5/9 Józef Kucia joseph.ku...@gmail.com: +    mip_levels = min(src_info-MipLevels, IDirect3DCubeTexture9_GetLevelCount(cube_texture)); +    for (face = D3DCUBEMAP_FACE_POSITIVE_X; face = D3DCUBEMAP_FACE_NEGATIVE_Z; face++) +    { +        size = src_info-Width; +        for (mip_level

Re: [5/8] d3dx9: Add DDS support in D3DXCreateTextureFromFile functions.

2012-05-10 Thread Matteo Bruni
2012/5/9 Józef Kucia joseph.ku...@gmail.com: --- +HRESULT load_texture_from_dds(IDirect3DTexture9 *texture, const void *src_data, UINT srd_data_size, +    const PALETTEENTRY *palette, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; ... +HRESULT

Re: [5/8] d3dx9: Add DDS support in D3DXCreateTextureFromFile functions.

2012-05-10 Thread Matteo Bruni
2012/5/10 Józef Kucia joseph.ku...@gmail.com: I noticed that I put more and more texture functions tests in tests/surface.c, because these tests needs the dds files which are in tests/surface.c. I wonder if it would be better to copy needed dds files to tests/texture.c and move texture

Re: [PATCH 5/5] d3dcompiler: Partially implement D3DCompile function.

2012-05-08 Thread Matteo Bruni
2012/5/8 Henri Verbeet hverb...@gmail.com: I realize compile_shader() is mostly a copy of assemble_shader(), but nevertheless: On 8 May 2012 16:17, Matteo Bruni mbr...@codeweavers.com wrote: +struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type, DWORD version

Re: [3/3] d3dx9: Implement conversion from DDS pixel format to D3DFORMAT.

2012-04-26 Thread Matteo Bruni
Il 26 aprile 2012 11:47, Józef Kucia joseph.ku...@gmail.com ha scritto:  static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pixel_format)  { -    FIXME(Pixel format conversion not implemented.\n); +    if (pixel_format-flags DDS_PF_FOURCC) +        return

Re: d3dx9/tests: Add DDS pixel format tests for D3DXGetImageInfoFromFileInMemory.

2012-04-19 Thread Matteo Bruni
Il 19 aprile 2012 19:37, Józef Kucia joseph.ku...@gmail.com ha scritto: ---  dlls/d3dx9_36/tests/surface.c |   65 +  1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index

Re: GSoC 2012 - Implement a few missing functions in D3DX9

2012-03-20 Thread Matteo Bruni
Il 20 marzo 2012 19:12, Christian Costa titan.co...@gmail.com ha scritto: Le 20/03/2012 18:43, Józef Kucia a écrit : Hi there, I'm writing to discuss my project proposal for upcoming Google Summer of Code. I was recently playing with Wine, looking around in the code and searching through

Re: wpp: Stop parsing single and double quoted string constants after a first newline character.

2012-03-15 Thread Matteo Bruni
Il 14 marzo 2012 23:02, Józef Kucia joseph.ku...@gmail.com ha scritto: @@ -679,11 +649,23 @@ void pp_writestring(const char *format, ...)                }        }  pp_iqs,pp_dqs,pp_sqs\\.      add_string(ppy_text, ppy_leng); -pp_iqs,pp_dqs,pp_sqs\n       { +pp_iqs\n             {          

Re: Preprocessing asm shaders

2012-03-13 Thread Matteo Bruni
Il 12 marzo 2012 22:13, Józef Kucia joseph.ku...@gmail.com ha scritto: Hi, I'm writing because I found a bug in asm shader preprocessor in Wine and I'm not sure what's the best way to fix it. The D3DPreprocess function is an universal shader preprocess for HLSL and asm shaders. In fact,

Re: GSoC 2011 - introduction

2012-03-12 Thread Matteo Bruni
Il 09 marzo 2012 23:41, Józef Kucia joseph.ku...@gmail.com ha scritto: Hi, My name is Józef Kucia. I'm a Masters student in Computer Science at Wrocław University of Technology in Poland. I would like to apply for Google Summer of Code this year. I have a good knowledge of C and OpenGL. I

Re: [PATCH 1/5] wined3d: Clamp fog coordinate in the vertex shader.

2012-03-08 Thread Matteo Bruni
Il 08 marzo 2012 22:10, Stefan Dösinger stefandoesin...@gmx.at ha scritto: Am Donnerstag, 8. März 2012, 18:22:15 schrieb Matteo Bruni: -                shader_addline(buffer, gl_FogFragCoord = OUT[%u].%c;\n, i, reg_mask[1]); +                shader_addline(buffer, gl_FogFragCoord = clamp(OUT

Re: OpenGL child windows (SketchUp)

2012-02-08 Thread Matteo Bruni
Il 08 febbraio 2012 18:19, Brian Bloniarz brian.bloni...@gmail.com ha scritto: Hi all, I could use a little help fixing a window lag and screen corruption issue in SketchUp: http://bugs.winehq.org/show_bug.cgi?id=25912 Long story short, I think the implementation of OpenGL child rendering

Re: [PATCH 3/3] d3d9/tests: More D3DTSS_TEXTURETRANSFORMFLAGS projection tests.

2012-01-18 Thread Matteo Bruni
2012/1/14 Saulius Krasuckas sauli...@ar.fi.lt: * On Tue, 27 Dec 2011, Matteo Bruni wrote: ---  dlls/d3d9/tests/visual.c |  388 --  1 files changed, 269 insertions(+), 119 deletions(-) Hello Matteo, this is http://source.winehq.org/git/wine.git

Re: po: Update Italian translation

2012-01-04 Thread Matteo Bruni
2012/1/4 Luca Bennati luc...@gmail.com: #: winmm.rc:34 -#, fuzzy msgid There is no driver installed on your system! -msgstr Non è stato installato nessun driver nel sistema !\n +msgstr Non è presente nessun driver installato nel sistema! Hi Luca, While your new translation is clearer than

Re: [PATCH 2/4] d3dx9: Implement ID3DXBaseEffect::SetVector().

2011-12-13 Thread Matteo Bruni
Hi Rico, 2011/12/13 Rico Schüller kgbric...@web.de: ---  dlls/d3dx9_36/effect.c |   52 +--  1 files changed, 49 insertions(+), 3 deletions(-) +static void set_vector(struct d3dx_parameter *param, CONST D3DXVECTOR4 *vector) +{ +

Re: [PATCH 4/4] d3dx9: Implement ID3DXBaseEffect::SetValue().

2011-12-13 Thread Matteo Bruni
2011/12/13 Rico Schüller kgbric...@web.de: ---  dlls/d3dx9_36/effect.c |   42 --  1 files changed, 40 insertions(+), 2 deletions(-) +TRACE(Copy %u bytes\n, param-bytes); +memcpy(param-data, data, bytes); That trace is

Re: [PATCH 2/5] d3d10: Implement D3D10StateBlockMaskDisableCapture().

2011-11-15 Thread Matteo Bruni
2011/11/15 Henri Verbeet hverb...@codeweavers.com: --- +UINT end = start_idx + count; +    start_idx += 7; +    memset(field[start_idx 3], 0, (end 3) - (start_idx 3)); Isn't that dangerous if count is 7 (assuming that is a valid value)?

Re: d3dx9_36/tests [patch 2/2, try 3]: Add tests for D3DXCreatePolygon

2011-11-09 Thread Matteo Bruni
2011/11/9 David Adam david.adam.c...@gmail.com: Better, but there are still issues: +if( polygon ) polygon-lpVtbl-Release(polygon); +if( ppBuffer ) ID3DXBuffer_Release(ppBuffer); You aren't setting those pointers to NULL (and your test shows that D3DXCreatePolygon doesn't touch them

Re: [PATCH 3/3] wined3d: Report all FBO-attachable formats as suitable for render target usage.

2011-11-09 Thread Matteo Bruni
2011/11/9 Matteo Bruni mbr...@codeweavers.com: --- This patch is not correct, please ignore it...

Re: d3dx9_36 [patch 1/2, resent]: Implement D3DXCreatePolygon

2011-11-08 Thread Matteo Bruni
2011/11/7 David Adam david.adam.c...@gmail.com: Hello, any problem with this patch http://source.winehq.org/patches/data/80433 and this one http://source.winehq.org/patches/data/80434 Thanks in advance David -- Forwarded message -- From: David Adam

Re: [1/2] d3dx9: Implemented non-equal declaration support in CloneMesh.

2011-10-24 Thread Matteo Bruni
Hi Michael, +for (i = 0; declaration1[i].Stream != 0xff; i++) +{ +if (memcmp(declaration1[i], declaration2[i], sizeof(*declaration1))) Doesn't that loop need to stop at the first end marker of either declaration? I.e. may the first vertex declaration be longer than the second

Re: [1/2] d3dx9: Implemented non-equal declaration support in CloneMesh.

2011-10-24 Thread Matteo Bruni
2011/10/24 Michael Mc Donnell mich...@mcdonnell.dk: On Mon, Oct 24, 2011 at 9:13 AM, Matteo Bruni matteo.myst...@gmail.com wrote: Hi Michael, +    for (i = 0; declaration1[i].Stream != 0xff; i++) +    { +        if (memcmp(declaration1[i], declaration2[i], sizeof(*declaration1

Re: wined3d: Report every texture format as filterable and blendable.

2011-10-12 Thread Matteo Bruni
2011/10/12 Dan Kegel d...@kegel.com: Fails d3d9's visual tests here. os:     Linux 3.0.0-12-generic, Ubuntu 11.10 gpu:    GeForce GT 240/PCI/SSE2 3.3.0 NVIDIA 280.13 On Wed, Oct 12, 2011 at 2:52 PM,  build...@kegel.com wrote: This is an experimental automated build and test service. Please

Re: d3dx9: CloneMesh test and improvements

2011-08-12 Thread Matteo Bruni
2011/8/12 Octavian Voicu octavian.vo...@gmail.com: On Fri, Aug 12, 2011 at 12:59 PM, Michael Mc Donnell mich...@mcdonnell.dk wrote: Is it ok to use roundf and rintf? They're both C99 functions. Hello, As far as I know C99 is not allowed. However, you can emulate round by doing: floorf(val

Re: d3dx9: CloneMesh test and improvements

2011-08-11 Thread Matteo Bruni
2011/8/11 Michael Mc Donnell mich...@mcdonnell.dk: +dst_ptr[0] = src-x 0.0f ? (SHORT)ceilf(src-x * SHRT_MAX + 0.5f) :(SHORT)floorf(src-x * SHRT_MAX + 0.5f); You can use roundf() instead. Actually, notice that maybe what you actually need for correct rounding is rintf() (which

Re: d3dx9: CloneMesh test and improvements

2011-08-09 Thread Matteo Bruni
2011/8/8 Michael Mc Donnell mich...@mcdonnell.dk: Hi I've been working on a test and improvements for CloneMesh as part of GSoC 2011. I would be grateful if anyone could comment on my work. There are five test cases in the attached patch:  0. Basic mesh cloning. Declaration has position and

Re: wined3d: Update GLSL spam filter for recent fglrx versions.

2011-08-03 Thread Matteo Bruni
2011/8/3 Stefan Dösinger stefandoesin...@gmx.at: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 03.08.2011 um 17:31 schrieb Matteo Bruni: Users tend to get confused by those messages on the terminal. Since we already have code to filter irrelevant GLSL compiler messages, let's update

Re: [3/3] ddraw/tests: Add a couple of fog tests.

2011-07-26 Thread Matteo Bruni
2011/7/27 Marvin test...@testbot.winehq.org: Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at

Re: d3dx9_36: Use SUCCEEDED instead of !FAILED.

2011-07-19 Thread Matteo Bruni
2011/7/19 Michael Stefaniuc mstef...@redhat.de: ---  dlls/d3dx9_36/mesh.c |    2 +-  1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index 94a291f..d8f72c4 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -3376,7

Re: [PATCH 1/2] d3dx9_36: Added support for structs and arrays to ID3DXConstantTable (Try 2)

2011-07-14 Thread Matteo Bruni
2011/7/14 Travis Athougies iamm...@gmail.com: Needed for Assassin's Creed Brotherhood and Dead Space 2. Changes from last patch:    - New way of distinguishing handles from strings    - Support for parent constants in ID3DXConstantTable::GetConstantByName and ID3DXConstantTable::GetConstant

Re: [PATCH 1/3] d3dx9/line: Implemented ID3DXLine's Draw method.

2011-06-30 Thread Matteo Bruni
2011/6/30 Charles Welton charles...@gmail.com: --- +memcpy(buffer_mem, vertices, size); There is no need to allocate and write into your own buffer then copy the content, you can directly write into the vertex buffer. A more important issue: MSDN says The ID3DXLine interface

Re: [2/2] d3dx9_36: Implement and add tests for D3DXFloat16To32Array.

2011-06-29 Thread Matteo Bruni
2011/6/29 Misha Koshelev misha...@gmail.com: --- ... +else return sgn * powf(2, -14.0f) * ((float)m / 1024.0f); ... +return sgn * powf(2, (float)e - 15.0f) * (1.0f + ((float)m / 1024.0f)); I think you don't need the explicit casts here, the values should be automatically

Re: [PATCH 2/2] d3dx9/line: Implemented tests for ID3DXLine's Begin and End methods.

2011-06-20 Thread Matteo Bruni
2011/6/18 Charles Welton charles...@gmail.com: ---  dlls/d3dx9_36/tests/line.c |   23 +++  1 files changed, 23 insertions(+), 0 deletions(-) +srand(time(NULL)); +random = ((FLOAT) rand())/RAND_MAX; /* Random value between 0.0 and 1.0. We're using this later. */

  1   2   >