d3dx9: Add some version-specific checks in the shader assembler.

Stefan Dösinger stefandoesinger at gmx.at
Wed May 19 04:10:27 CDT 2010


Am 18.05.2010 um 14:55 schrieb Matteo Bruni:
> +    if(!check_reg_type(src, vs_3_reg_allowed)) {
> +        asmparser_message(This, "Line %u: Source register %s not supported in VS 3.0\n",
> +                          This->line_no,
> +                          debug_print_srcreg(src, ST_VERTEX));
> +        set_parse_status(This, PARSE_ERR);
> +    }
I realize the patch has been committed already, but I'm wondering: Does the native assembler check the register numbers too? Or just the types?

You have to be careful with error checking in the assembler, because the native assembler checks for very few error conditions. More complex checks like uninitialized registers or unwritten output registers are checked by the shader validator, an undocumented interface in d3d9.dll(which is called by vsa.exe / psa.exe)

If my memory is correct, all the other error conditions you check for are checked by the native *assembler*, but I'm not sure about the register numbers. I think more unit tests would be helpful.




More information about the wine-devel mailing list