[v2 1/2] wined3d: Implement primitive restart index.

Henri Verbeet hverbeet at gmail.com
Tue Nov 22 08:02:33 CST 2016


On 21 November 2016 at 01:42, Józef Kucia <joseph.kucia at gmail.com> wrote:
> On Fri, Nov 18, 2016 at 4:44 AM, Andrew Wesie <awesie at gmail.com> wrote:
>> @@ -8602,6 +8602,16 @@ static void shader_glsl_init_context_state(struct wined3d_context *context)
>>
>>      gl_info->gl_ops.gl.p_glEnable(GL_PROGRAM_POINT_SIZE);
>>      checkGLcall("GL_PROGRAM_POINT_SIZE");
>> +    if (gl_info->supported[ARB_ES3_COMPATIBILITY])
>> +    {
>> +        /* We prefer this method because it correctly handles 16-bit and 32-bit indices. */
>> +        gl_info->gl_ops.gl.p_glEnable(GL_PRIMITIVE_RESTART_FIXED_INDEX);
>> +        checkGLcall("GL_PRIMITIVE_RESTART_FIXED_INDEX");
>> +    }
>
> Is it really safe to enable the primitive restart for all D3D
> versions? Shouldn't we enable it just for D3D10+?
It's probably "safe" in the sense that if previous versions don't have
primitive restart, and that seems likely at this point, you'd probably
get undefined behaviour instead, and primitive restart is as good of
an undefined behaviour as any other. Unless it's a valid index of
course, which is certainly a possibility with 16-bit indices in
particular, if perhaps not likely.

But regardless, we want to know for sure.



More information about the wine-devel mailing list