Re: [Mesa-dev] [PATCH 10/13] glsl: Add a lowering pass for gl_VertexID

2014-07-29 Thread Tapani Pälli
On 06/21/2014 04:01 AM, Ian Romanick wrote: > From: Ian Romanick > > Converts gl_VertexID to (gl_VertexIDMESA + gl_BaseVertex). gl_VertexIDMESA > is backed by SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, and gl_BaseVertex is backed > by a built-in uniform from {STATE_INTERNAL, STATE_BASE_VERTEX}. > > NOTE: T

Re: [Mesa-dev] [PATCH 10/13] glsl: Add a lowering pass for gl_VertexID

2014-06-23 Thread Ian Romanick
On 06/22/2014 04:32 AM, Marek Olšák wrote: > If you define enums in a struct or class, it then works like a > namespace. E.g. the proper form to use such an enum would be: > > ctx->Const.VertexID = gl_constants::gl_VertexID_native; I'd swear that I tried that... I know I tried a bunch of other va

Re: [Mesa-dev] [PATCH 10/13] glsl: Add a lowering pass for gl_VertexID

2014-06-22 Thread Marek Olšák
If you define enums in a struct or class, it then works like a namespace. E.g. the proper form to use such an enum would be: ctx->Const.VertexID = gl_constants::gl_VertexID_native; Marek On Sat, Jun 21, 2014 at 3:01 AM, Ian Romanick wrote: > From: Ian Romanick > > Converts gl_VertexID to (gl_V

[Mesa-dev] [PATCH 10/13] glsl: Add a lowering pass for gl_VertexID

2014-06-20 Thread Ian Romanick
From: Ian Romanick Converts gl_VertexID to (gl_VertexIDMESA + gl_BaseVertex). gl_VertexIDMESA is backed by SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, and gl_BaseVertex is backed by a built-in uniform from {STATE_INTERNAL, STATE_BASE_VERTEX}. NOTE: The enum has to be declared outside the struct or C++ jus