[Mesa-dev] [PATCH 20/34] mesa: Validate the drawing primitive against the geometry shader input primitive type.

Paul Berry stereotype441 at gmail.com
Tue Jul 30 20:32:22 PDT 2013


On 30 July 2013 15:41, Kenneth Graunke <kenneth at whitecape.org> wrote:

> On 07/28/2013 11:03 PM, Paul Berry wrote:
>
>> From: Fabian Bieler <fabianbieler at fastmail.fm>
>>
>> Reviewed-by: Paul Berry <stereotype441 at gmail.com>
>> ---
>>   src/mesa/main/api_validate.c | 68 ++++++++++++++++++++++++++++++**
>> ++++++++++++++
>>   1 file changed, 68 insertions(+)
>>
>> diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
>> index 8a2ec7b..7d4a4c1 100644
>> --- a/src/mesa/main/api_validate.c
>> +++ b/src/mesa/main/api_validate.c
>> @@ -245,6 +245,74 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum
>> mode, const char *name)
>>         return GL_FALSE;
>>      }
>>
>> +   /* From the ARB_geometry_shader4 spec:
>> +    *
>> +    * The error INVALID_OPERATION is generated if Begin, or any command
>> that
>> +    * implicitly calls Begin, is called when a geometry shader is active
>> and:
>> +    *
>> +    * * the input primitive type of the current geometry shader is
>> +    *   POINTS and <mode> is not POINTS,
>> +    *
>> +    * * the input primitive type of the current geometry shader is
>> +    *   LINES and <mode> is not LINES, LINE_STRIP, or LINE_LOOP,
>> +    *
>> +    * * the input primitive type of the current geometry shader is
>> +    *   TRIANGLES and <mode> is not TRIANGLES, TRIANGLE_STRIP or
>> +    *   TRIANGLE_FAN,
>> +    *
>> +    * * the input primitive type of the current geometry shader is
>> +    *   LINES_ADJACENCY_ARB and <mode> is not LINES_ADJACENCY_ARB or
>> +    *   LINE_STRIP_ADJACENCY_ARB, or
>> +    *
>> +    * * the input primitive type of the current geometry shader is
>> +    *   TRIANGLES_ADJACENCY_ARB and <mode> is not
>> +    *   TRIANGLES_ADJACENCY_ARB or TRIANGLE_STRIP_ADJACENCY_ARB.
>> +    *
>> +   */
>> +   if(ctx->Shader.**CurrentGeometryProgram) {
>>
>
> Style nit: missing space.  should be:
>
>    if (ctx->Shader.**CurrentGeometryProgram) {


Fixed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130730/2995d2a3/attachment-0001.html>


More information about the mesa-dev mailing list