[2/5] WineD3D: Implement loops with the NV extensions

Stefan Dösinger stefan at codeweavers.com
Wed Jun 10 17:45:57 CDT 2009


Am 10.06.2009 um 15:20 schrieb Allan Tong:

>> +    if(vshader)
>> +    {
>> +        struct shader_arb_ctx_priv *priv = ins->ctx->backend_data;
>> +        struct list *e = list_head(&priv->control_frames);
>> +        struct control_frame *control_frame = LIST_ENTRY(e, struct  
>> control_frame, entry);
>> +
>> +        if(priv->loop_depth > 1) shader_addline(buffer, "PUSHA aL; 
>> \n");
>> +
>> +        shader_addline(buffer, "ARLC aL, %s.xywz;\n", src_name);
>> +        shader_addline(buffer, "BRA loop_%u_end (LE.x);\n",  
>> control_frame->loop_no);
>> +        shader_addline(buffer, "loop_%u_start:\n", control_frame- 
>> >loop_no);
>> +    }
>
> Nested loops still don't work here.  You need NV_vertex_program3 in
> order to use PUSHA and POPA.
Well, I enable NV_vertex_program3 if available. I don't check for it  
because if the app uses nested loops and it is not supported, then  
there isn't anything I can do anyway, and we advertised the wrong  
shader version or something else went wrong. (e.g. we get a 3.0  
shader, only support 2.0 and don't return an error, or we get a broken  
shader and don't check it properly)





More information about the wine-devel mailing list