mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
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 <kenneth@whitecape.org> Acked-by: Chris Forbes <chrisf@ijw.co.nz> Acked-by: Paul Berry <stereotype441@gmail.com> Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
963d9f78a4
commit
99ebf9d07a
2 changed files with 21 additions and 25 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue