[PATCH 02/10] d3d10: Implement annotation parsing.

Rico Schüller kgbricola at web.de
Wed Sep 9 06:41:17 CDT 2009


Am 09.09.2009 12:47, schrieb Henri Verbeet:
> 2009/9/9 Rico Schüller<kgbricola at web.de>:
>    
>> -static void parse_fx10_annotation(const char **ptr)
>> +static HRESULT parse_fx10_annotation(struct d3d10_effect_variable *a, const char **ptr, const char *data)
>>   {
>> -    skip_dword_unknown(ptr, 3);
>> +    DWORD offset;
>> +
>> +    read_dword(ptr,&offset);
>> +    TRACE("Annotation name at offset %#x.\n", offset);
>> +
>> +    a->name = copy_name(data + offset);
>> +    if (!a->name)
>> +    {
>> +        ERR("Failed to copy name.\n");
>> +        return E_OUTOFMEMORY;
>> +    }
>> +    TRACE("Annotation name: %s.\n", a->name);
>> +
>> +    read_dword(ptr,&offset);
>> +    TRACE("Annotation type info at offset %#x.\n", offset);
>> +
>> +    a->type = get_fx10_type(a->effect, data, offset);
>> +    if (!a->type)
>> +    {
>> +        ERR("Failed to get variable type.\n");
>> +        return E_FAIL;
>> +    }
>> +
>> +    skip_dword_unknown(ptr, 1);
>> +
>> +    return S_OK;
>>   }
>>      
> It seems to me that this is just the same code for parsing variables
> (that has implications for 1/10 as well).
>
>
>    
I'll resend an improved version.

Cheers
Rico



More information about the wine-devel mailing list