Re: [Mesa-dev] [PATCH 2/2] i965: Clean up context constant initialization code.

2015-11-16 Thread Jordan Justen
On 2015-11-12 15:38:52, Kenneth Graunke wrote: > This was getting pretty out of hand, and with compute partially in place > and tessellation on the way, it was only going to get worse. > > This patch makes a "stage exists?" predicate and a "number of stages" > count and uses them to clean up a lot

Re: [Mesa-dev] [PATCH 2/2] i965: Clean up context constant initialization code.

2015-11-13 Thread Kenneth Graunke
On Friday, November 13, 2015 10:10:28 AM Pohjolainen, Topi wrote: > On Thu, Nov 12, 2015 at 03:38:52PM -0800, Kenneth Graunke wrote: > > This was getting pretty out of hand, and with compute partially in place > > and tessellation on the way, it was only going to get worse. > > > > This patch make

Re: [Mesa-dev] [PATCH 2/2] i965: Clean up context constant initialization code.

2015-11-13 Thread Pohjolainen, Topi
On Thu, Nov 12, 2015 at 03:38:52PM -0800, Kenneth Graunke wrote: > This was getting pretty out of hand, and with compute partially in place > and tessellation on the way, it was only going to get worse. > > This patch makes a "stage exists?" predicate and a "number of stages" > count and uses them

Re: [Mesa-dev] [PATCH 2/2] i965: Clean up context constant initialization code.

2015-11-12 Thread Kenneth Graunke
On Thursday, November 12, 2015 03:38:52 PM Kenneth Graunke wrote: [snip] > - ctx->Const.MaxDualSourceDrawBuffers = 1; > - ctx->Const.MaxDrawBuffers = BRW_MAX_DRAW_BUFFERS; > - ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = > max_samplers; > - ctx->Const.MaxTextureCoordUnit

[Mesa-dev] [PATCH 2/2] i965: Clean up context constant initialization code.

2015-11-12 Thread Kenneth Graunke
This was getting pretty out of hand, and with compute partially in place and tessellation on the way, it was only going to get worse. This patch makes a "stage exists?" predicate and a "number of stages" count and uses them to clean up a lot of calculations. We can just loop over shader stages an