[PATCH 1/5] d3dcompiler_43/tests: Added HLSL test suite

Travis Athougies iammisc at gmail.com
Wed Sep 29 01:21:12 CDT 2010


On Mon, Sep 27, 2010 at 3:57 AM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 27 September 2010 02:22, Travis Athougies <iammisc at gmail.com> wrote:
>>>> +    /* The Direct3D 9 docs state that we cannot lock a render target surface,
>>>> +       instead we must copy the render target onto this surface to lock it */
>>> I think you can, if you create it with D3DUSAGE_DYNAMIC | D3DUSAGE_RENDERTARGET. If you want the backbuffer to be lockable you'll need some device creation flag whose name I forgot.
>>
>> There is the lockable boolean argument that I think might work. I will
>> look into using this
>>
> Please don't. I think GetRenderTargetData() is the correct way to do
> this. Generally you don't want lockable render targets at all, but the
> case where they're "useful" is for writing data to the render target,
> not reading.

This is what I read somewhere, some time ago, so I'll just keep it the same.

>
> The problem with your current setup is that you do the readback after
> doing a Present(). Present() invalidates the contents of the
> backbuffer.
>
>> +        ok(data[0] == D3DCOLOR_ARGB(0, 0, 255, 255),
>> +                "swizzle_test: Got color %08x (should be 0x0000FFFF)\n", data[0]);
> While I doubt you're going to care a lot for this specific test, I
> think it makes sense to integrate something like color_match() from
> the d3d9 tests right from the start. In fact, I think the way you want
> to do this is to keep the actual testing inside
> compile_pixel_shader9(). E.g., you could pass it an array with things
> like probe locations, expected values, allowed deviations and failure
> messages.

I'm wondering... Inside compile_pixel_shader9? or compute_pixel_shader9? I'm
thinking that this might make the argument list of
compile_pixel_shader9 really really
ugly. I'm unsure of exactly what you're telling me here? Could you be
more explicit?

>
>> +    if (caps.PixelShaderVersion >= 0xffff0200)
> You can just use D3DPS_VERSION(2, 0) here.
>

Uhmm.... Didn't know that.. thanks!

-- 
Travis Athougies



More information about the wine-devel mailing list