projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i915: Drop broken front_buffer_reading/drawing optimization
[mesa.git]
/
src
/
mesa
/
drivers
/
dri
/
i915
/
i915_state.c
diff --git
a/src/mesa/drivers/dri/i915/i915_state.c
b/src/mesa/drivers/dri/i915/i915_state.c
index 32e5f98ce67dfa722c542192d525957d808e1660..4c83073e6927e634786b06d2677d007f4078749e 100644
(file)
--- a/
src/mesa/drivers/dri/i915/i915_state.c
+++ b/
src/mesa/drivers/dri/i915/i915_state.c
@@
-197,9
+197,9
@@
i915AlphaFunc(struct gl_context * ctx, GLenum func, GLfloat ref)
}
/* This function makes sure that the proper enables are
}
/* This function makes sure that the proper enables are
- * set for LogicOp, Independ
a
nt Alpha Blend, and Blending.
+ * set for LogicOp, Independ
e
nt Alpha Blend, and Blending.
* It needs to be called from numerous places where we
* It needs to be called from numerous places where we
- * could change the LogicOp or Independ
a
nt Alpha Blend without subsequent
+ * could change the LogicOp or Independ
e
nt Alpha Blend without subsequent
* calls to glEnable.
*/
static void
* calls to glEnable.
*/
static void
@@
-241,7
+241,7
@@
i915BlendColor(struct gl_context * ctx, const GLfloat color[4])
GLubyte r, g, b, a;
GLuint dw;
GLubyte r, g, b, a;
GLuint dw;
- DBG("%s\n", __
FUNCTION
__);
+ DBG("%s\n", __
func
__);
UNCLAMPED_FLOAT_TO_UBYTE(r, color[RCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(g, color[GCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(r, color[RCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(g, color[GCOMP]);
@@
-357,7
+357,7
@@
i915DepthFunc(struct gl_context * ctx, GLenum func)
int test = intel_translate_compare_func(func);
GLuint dw;
int test = intel_translate_compare_func(func);
GLuint dw;
- DBG("%s\n", __
FUNCTION
__);
+ DBG("%s\n", __
func
__);
dw = i915->state.Ctx[I915_CTXREG_LIS6];
dw &= ~S6_DEPTH_TEST_FUNC_MASK;
dw = i915->state.Ctx[I915_CTXREG_LIS6];
dw &= ~S6_DEPTH_TEST_FUNC_MASK;
@@
-374,7
+374,7
@@
i915DepthMask(struct gl_context * ctx, GLboolean flag)
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint dw;
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint dw;
- DBG("%s flag (%d)\n", __
FUNCTION
__, flag);
+ DBG("%s flag (%d)\n", __
func
__, flag);
if (!ctx->DrawBuffer || !ctx->DrawBuffer->Visual.depthBits)
flag = false;
if (!ctx->DrawBuffer || !ctx->DrawBuffer->Visual.depthBits)
flag = false;
@@
-402,7
+402,7
@@
void
intelCalcViewport(struct gl_context * ctx)
{
struct intel_context *intel = intel_context(ctx);
intelCalcViewport(struct gl_context * ctx)
{
struct intel_context *intel = intel_context(ctx);
-
double
scale[3], translate[3];
+
float
scale[3], translate[3];
_mesa_get_viewport_xform(ctx, 0, scale, translate);
_mesa_get_viewport_xform(ctx, 0, scale, translate);
@@
-501,7
+501,7
@@
i915Scissor(struct gl_context * ctx)
if (!ctx->DrawBuffer)
return;
if (!ctx->DrawBuffer)
return;
- DBG("%s %d,%d %dx%d\n", __
FUNCTION
__,
+ DBG("%s %d,%d %dx%d\n", __
func
__,
ctx->Scissor.ScissorArray[0].X, ctx->Scissor.ScissorArray[0].Y,
ctx->Scissor.ScissorArray[0].Width, ctx->Scissor.ScissorArray[0].Height);
ctx->Scissor.ScissorArray[0].X, ctx->Scissor.ScissorArray[0].Y,
ctx->Scissor.ScissorArray[0].Width, ctx->Scissor.ScissorArray[0].Height);
@@
-512,7
+512,7
@@
i915Scissor(struct gl_context * ctx)
x2 = ctx->Scissor.ScissorArray[0].X
+ ctx->Scissor.ScissorArray[0].Width - 1;
y2 = y1 + ctx->Scissor.ScissorArray[0].Height - 1;
x2 = ctx->Scissor.ScissorArray[0].X
+ ctx->Scissor.ScissorArray[0].Width - 1;
y2 = y1 + ctx->Scissor.ScissorArray[0].Height - 1;
- DBG("%s %d..%d,%d..%d (inverted)\n", __
FUNCTION
__, x1, x2, y1, y2);
+ DBG("%s %d..%d,%d..%d (inverted)\n", __
func
__, x1, x2, y1, y2);
}
else {
/* FBO - not inverted
}
else {
/* FBO - not inverted
@@
-523,7
+523,7
@@
i915Scissor(struct gl_context * ctx)
+ ctx->Scissor.ScissorArray[0].Width - 1;
y2 = ctx->Scissor.ScissorArray[0].Y
+ ctx->Scissor.ScissorArray[0].Height - 1;
+ ctx->Scissor.ScissorArray[0].Width - 1;
y2 = ctx->Scissor.ScissorArray[0].Y
+ ctx->Scissor.ScissorArray[0].Height - 1;
- DBG("%s %d..%d,%d..%d (not inverted)\n", __
FUNCTION
__, x1, x2, y1, y2);
+ DBG("%s %d..%d,%d..%d (not inverted)\n", __
func
__, x1, x2, y1, y2);
}
x1 = CLAMP(x1, 0, ctx->DrawBuffer->Width - 1);
}
x1 = CLAMP(x1, 0, ctx->DrawBuffer->Width - 1);
@@
-531,7
+531,7
@@
i915Scissor(struct gl_context * ctx)
x2 = CLAMP(x2, 0, ctx->DrawBuffer->Width - 1);
y2 = CLAMP(y2, 0, ctx->DrawBuffer->Height - 1);
x2 = CLAMP(x2, 0, ctx->DrawBuffer->Width - 1);
y2 = CLAMP(y2, 0, ctx->DrawBuffer->Height - 1);
- DBG("%s %d..%d,%d..%d (clamped)\n", __
FUNCTION
__, x1, x2, y1, y2);
+ DBG("%s %d..%d,%d..%d (clamped)\n", __
func
__, x1, x2, y1, y2);
I915_STATECHANGE(i915, I915_UPLOAD_BUFFERS);
i915->state.Buffer[I915_DESTREG_SR1] = (y1 << 16) | (x1 & 0xffff);
I915_STATECHANGE(i915, I915_UPLOAD_BUFFERS);
i915->state.Buffer[I915_DESTREG_SR1] = (y1 << 16) | (x1 & 0xffff);
@@
-544,7
+544,7
@@
i915LogicOp(struct gl_context * ctx, GLenum opcode)
struct i915_context *i915 = I915_CONTEXT(ctx);
int tmp = intel_translate_logic_op(opcode);
struct i915_context *i915 = I915_CONTEXT(ctx);
int tmp = intel_translate_logic_op(opcode);
- DBG("%s\n", __
FUNCTION
__);
+ DBG("%s\n", __
func
__);
I915_STATECHANGE(i915, I915_UPLOAD_CTX);
i915->state.Ctx[I915_CTXREG_STATE4] &= ~LOGICOP_MASK;
I915_STATECHANGE(i915, I915_UPLOAD_CTX);
i915->state.Ctx[I915_CTXREG_STATE4] &= ~LOGICOP_MASK;
@@
-559,7
+559,7
@@
i915CullFaceFrontFace(struct gl_context * ctx, GLenum unused)
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint mode, dw;
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint mode, dw;
- DBG("%s %d\n", __
FUNCTION
__,
+ DBG("%s %d\n", __
func
__,
ctx->DrawBuffer ? ctx->DrawBuffer->Name : 0);
if (!ctx->Polygon.CullFlag) {
ctx->DrawBuffer ? ctx->DrawBuffer->Name : 0);
if (!ctx->Polygon.CullFlag) {
@@
-595,7
+595,7
@@
i915LineWidth(struct gl_context * ctx, GLfloat widthf)
int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_LINE_WIDTH_MASK;
int width;
int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_LINE_WIDTH_MASK;
int width;
- DBG("%s\n", __
FUNCTION
__);
+ DBG("%s\n", __
func
__);
width = (int) (widthf * 2);
width = CLAMP(width, 1, 0xf);
width = (int) (widthf * 2);
width = CLAMP(width, 1, 0xf);
@@
-614,7
+614,7
@@
i915PointSize(struct gl_context * ctx, GLfloat size)
int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_POINT_WIDTH_MASK;
GLint point_size = (int) round(size);
int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_POINT_WIDTH_MASK;
GLint point_size = (int) round(size);
- DBG("%s\n", __
FUNCTION
__);
+ DBG("%s\n", __
func
__);
point_size = CLAMP(point_size, 1, 255);
lis4 |= point_size << S4_POINT_WIDTH_SHIFT;
point_size = CLAMP(point_size, 1, 255);
lis4 |= point_size << S4_POINT_WIDTH_SHIFT;
@@
-697,7
+697,7
@@
i915ColorMask(struct gl_context * ctx,
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint tmp = i915->state.Ctx[I915_CTXREG_LIS5] & ~S5_WRITEDISABLE_MASK;
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint tmp = i915->state.Ctx[I915_CTXREG_LIS5] & ~S5_WRITEDISABLE_MASK;
- DBG("%s r(%d) g(%d) b(%d) a(%d)\n", __
FUNCTION
__, r, g, b,
+ DBG("%s r(%d) g(%d) b(%d) a(%d)\n", __
func
__, r, g, b,
a);
if (!r)
a);
if (!r)
@@
-726,7
+726,7
@@
update_specular(struct gl_context * ctx)
static void
i915LightModelfv(struct gl_context * ctx, GLenum pname, const GLfloat * param)
{
static void
i915LightModelfv(struct gl_context * ctx, GLenum pname, const GLfloat * param)
{
- DBG("%s\n", __
FUNCTION
__);
+ DBG("%s\n", __
func
__);
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) {
update_specular(ctx);
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) {
update_specular(ctx);