diff options
author | Kenneth Graunke <[email protected]> | 2013-07-02 18:05:48 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-07-09 14:08:47 -0700 |
commit | 99ebf9d07a23b8c920912dc8289d97e17c753ee2 (patch) | |
tree | 00a7277a9a9e3c1418212dc15c8a9c2ba54bf6a3 /src/mesa | |
parent | 963d9f78a4931b7dd73d904b4c1e5f01010cd477 (diff) |
i965: Move ctx->Const setup from intelInitContext to the new helper.
This also requires moving _mesa_init_point() to after the ctx->Const
initialization.
Signed-off-by: Kenneth Graunke <[email protected]>
Acked-by: Chris Forbes <[email protected]>
Acked-by: Paul Berry <[email protected]>
Acked-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 21 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.c | 25 |
2 files changed, 21 insertions, 25 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 143463c3023..4507c54a7e5 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -33,6 +33,7 @@ #include "main/api_exec.h" #include "main/imports.h" #include "main/macros.h" +#include "main/points.h" #include "main/simple_list.h" #include "main/version.h" #include "main/vtxfmt.h" @@ -115,6 +116,8 @@ brw_initialize_context_constants(struct brw_context *brw) ctx->Const.QueryCounterBits.Timestamp = 36; + ctx->Const.StripTextureBorder = true; + ctx->Const.MaxDualSourceDrawBuffers = 1; ctx->Const.MaxDrawBuffers = BRW_MAX_DRAW_BUFFERS; ctx->Const.FragmentProgram.MaxTextureImageUnits = BRW_MAX_TEX_UNIT; @@ -142,6 +145,8 @@ brw_initialize_context_constants(struct brw_context *brw) ctx->Const.MaxTextureMaxAnisotropy = 16.0; + ctx->Const.MaxRenderbufferSize = 8192; + /* Hardware only supports a limited number of transform feedback buffers. * So we need to override the Mesa default (which is based only on software * limits). @@ -174,7 +179,20 @@ brw_initialize_context_constants(struct brw_context *brw) ctx->Const.MaxIntegerSamples = 8; } + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 5.0; + ctx->Const.MaxLineWidthAA = 5.0; + ctx->Const.LineWidthGranularity = 0.5; + + ctx->Const.MinPointSize = 1.0; + ctx->Const.MinPointSizeAA = 1.0; + ctx->Const.MaxPointSize = 255.0; ctx->Const.MaxPointSizeAA = 255.0; + ctx->Const.PointSizeGranularity = 1.0; + + if (intel->gen >= 6) + ctx->Const.MaxClipPlanes = 8; ctx->Const.VertexProgram.MaxNativeInstructions = 16 * 1024; ctx->Const.VertexProgram.MaxAluInstructions = 0; @@ -292,6 +310,9 @@ brwCreateContext(int api, brw_initialize_context_constants(brw); + /* Reinitialize the context point state. It depends on ctx->Const values. */ + _mesa_init_point(ctx); + if (intel->gen >= 6) { /* Create a new hardware context. Using a hardware context means that * our GPU state will be saved/restored on context switch, allowing us diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index ea7ea1424c6..358fa07e9f4 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -32,7 +32,6 @@ #include "main/fbobject.h" #include "main/framebuffer.h" #include "main/imports.h" -#include "main/points.h" #include "main/renderbuffer.h" #include "swrast/swrast.h" @@ -532,30 +531,6 @@ intelInitContext(struct intel_context *intel, break; } - ctx->Const.MinLineWidth = 1.0; - ctx->Const.MinLineWidthAA = 1.0; - ctx->Const.MaxLineWidth = 5.0; - ctx->Const.MaxLineWidthAA = 5.0; - ctx->Const.LineWidthGranularity = 0.5; - - ctx->Const.MinPointSize = 1.0; - ctx->Const.MinPointSizeAA = 1.0; - ctx->Const.MaxPointSize = 255.0; - ctx->Const.MaxPointSizeAA = 3.0; - ctx->Const.PointSizeGranularity = 1.0; - - if (intel->gen >= 6) - ctx->Const.MaxClipPlanes = 8; - - ctx->Const.StripTextureBorder = GL_TRUE; - - /* reinitialize the context point state. - * It depend on constants in __struct gl_contextRec::Const - */ - _mesa_init_point(ctx); - - ctx->Const.MaxRenderbufferSize = 8192; - /* Initialize the software rasterizer and helper modules. * * As of GL 3.1 core, the gen4+ driver doesn't need the swrast context for |