Compare commits
16 Commits
mesa-10.1.
...
mesa-10.1.
Author | SHA1 | Date | |
---|---|---|---|
|
feb4c7284c | ||
|
b614628a3c | ||
|
1f08d1bf46 | ||
|
a73894a7ed | ||
|
cf08c24750 | ||
|
4d676c5ed2 | ||
|
4942eae869 | ||
|
1776a562b4 | ||
|
d2f5638ade | ||
|
ee0207a212 | ||
|
36e0e9c5e7 | ||
|
5d8e60dcc7 | ||
|
a23e73e00d | ||
|
a02f6639f7 | ||
|
ec83a39e2b | ||
|
ea5839c8fe |
@@ -13,3 +13,13 @@ ac35ded4733883037316d556af596524e5e02535
|
||||
|
||||
# And this one was simply a bug fix for the previously-retracted commit
|
||||
2bab95973d8ad3a84f62670143d6f26c230d9582
|
||||
|
||||
# Here we have a commit, and its subsequent "revert" both proposed within a
|
||||
# single window of the stable release. So we can achieve the same final effect
|
||||
# by ignoring both of the commits.
|
||||
e3cc0d90e14e62a0a787b6c07a6df0f5c84039be
|
||||
0d5ec2c615784929be095951f9269773a790a2dd
|
||||
|
||||
# The function being modified here (_eglCreateWindowSurfaceCommon) does not
|
||||
# exist in the 10.1 branch.
|
||||
91ff0d4c6510dc38f279c586ced17fba917873e7
|
||||
|
@@ -32,6 +32,9 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
e934365d77f384bfaec844999440bef8 MesaLib-10.1.4.tar.gz
|
||||
6fddee101f49b7409cd29994c34ddee7 MesaLib-10.1.4.tar.bz2
|
||||
ba5f48e7d5e373922c804c2651fec6c1 MesaLib-10.1.4.zip
|
||||
</pre>
|
||||
|
||||
|
||||
|
102
docs/relnotes/10.1.5.html
Normal file
102
docs/relnotes/10.1.5.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.1.5 Release Notes / (June 6, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.5 is a bug fix release which fixes bugs found since the 10.1.4 release.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa 10.1.5 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79115">Bug 79115</a> - </li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79421">Bug 79421</a> - </li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>glsl: fix use-after free bug/crash in ast_declarator_list::hir()</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (5):</p>
|
||||
<ul>
|
||||
<li>docs: Add md5sums for 10.1.4 release</li>
|
||||
<li>Merge remote-tracking branch 'origin/10.1' into 10.1</li>
|
||||
<li>cherry-ignore: Ignore two commits.</li>
|
||||
<li>Ignore a patch that is not needed for the 10.1 branch.</li>
|
||||
<li>Update version to 10.1.5</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>glx: do not leak dri3Display</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (2):</p>
|
||||
<ul>
|
||||
<li>nv50/ir: fix s32 x s32 -> high s32 multiply logic</li>
|
||||
<li>nv50/ir: fix constant folding for OP_MUL subop HIGH</li>
|
||||
</ul>
|
||||
|
||||
<p>James Legg (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix unbinding GL_DEPTH_STENCIL_ATTACHMENT</li>
|
||||
</ul>
|
||||
|
||||
<p>Jeremy Huddleston Sequoia (2):</p>
|
||||
<ul>
|
||||
<li>glapi: Avoid heap corruption in _glapi_table</li>
|
||||
<li>darwin: Fix test for kCGLPFAOpenGLProfile support at runtime</li>
|
||||
</ul>
|
||||
|
||||
<p>Pavel Popov (2):</p>
|
||||
<ul>
|
||||
<li>i965: Properly return *RESET* status in glGetGraphicsResetStatusARB</li>
|
||||
<li>i965: Fix Line Stipple enable bit in 3DSTATE_SF for Haswell.</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>llvmpipe: fix crash when not all attachments are populated in a fb</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -376,9 +376,15 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
|
||||
|
||||
/* color buffer */
|
||||
for (i = 0; i < scene->fb.nr_cbufs; i++){
|
||||
stride[i] = scene->cbufs[i].stride;
|
||||
color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, tile_x + x,
|
||||
tile_y + y, inputs->layer);
|
||||
if (scene->fb.cbufs[i]) {
|
||||
stride[i] = scene->cbufs[i].stride;
|
||||
color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, tile_x + x,
|
||||
tile_y + y, inputs->layer);
|
||||
}
|
||||
else {
|
||||
stride[i] = 0;
|
||||
color[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* depth buffer */
|
||||
|
@@ -37,18 +37,25 @@ namespace nv50_ir {
|
||||
// ah*bl 00
|
||||
//
|
||||
// fffe0001 + fffe0001
|
||||
//
|
||||
// Note that this sort of splitting doesn't work for signed values, so we
|
||||
// compute the sign on those manually and then perform an unsigned multiply.
|
||||
static bool
|
||||
expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
||||
{
|
||||
const bool highResult = mul->subOp == NV50_IR_SUBOP_MUL_HIGH;
|
||||
|
||||
DataType fTy = mul->sType; // full type
|
||||
DataType hTy;
|
||||
DataType fTy; // full type
|
||||
switch (mul->sType) {
|
||||
case TYPE_S32: fTy = TYPE_U32; break;
|
||||
case TYPE_S64: fTy = TYPE_U64; break;
|
||||
default: fTy = mul->sType; break;
|
||||
}
|
||||
|
||||
DataType hTy; // half type
|
||||
switch (fTy) {
|
||||
case TYPE_S32: hTy = TYPE_S16; break;
|
||||
case TYPE_U32: hTy = TYPE_U16; break;
|
||||
case TYPE_U64: hTy = TYPE_U32; break;
|
||||
case TYPE_S64: hTy = TYPE_S32; break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -59,15 +66,25 @@ expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
||||
|
||||
bld->setPosition(mul, true);
|
||||
|
||||
Value *s[2];
|
||||
Value *a[2], *b[2];
|
||||
Value *c[2];
|
||||
Value *t[4];
|
||||
for (int j = 0; j < 4; ++j)
|
||||
t[j] = bld->getSSA(fullSize);
|
||||
|
||||
s[0] = mul->getSrc(0);
|
||||
s[1] = mul->getSrc(1);
|
||||
|
||||
if (isSignedType(mul->sType)) {
|
||||
s[0] = bld->getSSA(fullSize);
|
||||
s[1] = bld->getSSA(fullSize);
|
||||
bld->mkOp1(OP_ABS, mul->sType, s[0], mul->getSrc(0));
|
||||
bld->mkOp1(OP_ABS, mul->sType, s[1], mul->getSrc(1));
|
||||
}
|
||||
|
||||
// split sources into halves
|
||||
i[0] = bld->mkSplit(a, halfSize, mul->getSrc(0));
|
||||
i[1] = bld->mkSplit(b, halfSize, mul->getSrc(1));
|
||||
i[0] = bld->mkSplit(a, halfSize, s[0]);
|
||||
i[1] = bld->mkSplit(b, halfSize, s[1]);
|
||||
|
||||
i[2] = bld->mkOp2(OP_MUL, fTy, t[0], a[0], b[1]);
|
||||
i[3] = bld->mkOp3(OP_MAD, fTy, t[1], a[1], b[0], t[0]);
|
||||
@@ -75,24 +92,76 @@ expandIntegerMUL(BuildUtil *bld, Instruction *mul)
|
||||
i[4] = bld->mkOp3(OP_MAD, fTy, t[3], a[0], b[0], t[2]);
|
||||
|
||||
if (highResult) {
|
||||
Value *r[4];
|
||||
Value *c[2];
|
||||
Value *r[5];
|
||||
Value *imm = bld->loadImm(NULL, 1 << (halfSize * 8));
|
||||
c[0] = bld->getSSA(1, FILE_FLAGS);
|
||||
c[1] = bld->getSSA(1, FILE_FLAGS);
|
||||
for (int j = 0; j < 4; ++j)
|
||||
for (int j = 0; j < 5; ++j)
|
||||
r[j] = bld->getSSA(fullSize);
|
||||
|
||||
i[8] = bld->mkOp2(OP_SHR, fTy, r[0], t[1], bld->mkImm(halfSize * 8));
|
||||
i[6] = bld->mkOp2(OP_ADD, fTy, r[1], r[0], imm);
|
||||
bld->mkMov(r[3], r[0])->setPredicate(CC_NC, c[0]);
|
||||
bld->mkOp2(OP_UNION, TYPE_U32, r[2], r[1], r[3]);
|
||||
i[5] = bld->mkOp3(OP_MAD, fTy, mul->getDef(0), a[1], b[1], r[2]);
|
||||
i[5] = bld->mkOp3(OP_MAD, fTy, r[4], a[1], b[1], r[2]);
|
||||
|
||||
// set carry defs / sources
|
||||
i[3]->setFlagsDef(1, c[0]);
|
||||
i[4]->setFlagsDef(0, c[1]); // actual result not required, just the carry
|
||||
// actual result required in negative case, but ignored for
|
||||
// unsigned. for some reason the compiler ends up dropping the whole
|
||||
// instruction if the destination is unused but the flags are.
|
||||
if (isSignedType(mul->sType))
|
||||
i[4]->setFlagsDef(1, c[1]);
|
||||
else
|
||||
i[4]->setFlagsDef(0, c[1]);
|
||||
i[6]->setPredicate(CC_C, c[0]);
|
||||
i[5]->setFlagsSrc(3, c[1]);
|
||||
|
||||
if (isSignedType(mul->sType)) {
|
||||
Value *cc[2];
|
||||
Value *rr[7];
|
||||
Value *one = bld->getSSA(fullSize);
|
||||
bld->loadImm(one, 1);
|
||||
for (int j = 0; j < 7; j++)
|
||||
rr[j] = bld->getSSA(fullSize);
|
||||
|
||||
// NOTE: this logic uses predicates because splitting basic blocks is
|
||||
// ~impossible during the SSA phase. The RA relies on a correlation
|
||||
// between edge order and phi node sources.
|
||||
|
||||
// Set the sign of the result based on the inputs
|
||||
bld->mkOp2(OP_XOR, fTy, NULL, mul->getSrc(0), mul->getSrc(1))
|
||||
->setFlagsDef(0, (cc[0] = bld->getSSA(1, FILE_FLAGS)));
|
||||
|
||||
// 1s complement of 64-bit value
|
||||
bld->mkOp1(OP_NOT, fTy, rr[0], r[4])
|
||||
->setPredicate(CC_S, cc[0]);
|
||||
bld->mkOp1(OP_NOT, fTy, rr[1], t[3])
|
||||
->setPredicate(CC_S, cc[0]);
|
||||
|
||||
// add to low 32-bits, keep track of the carry
|
||||
Instruction *n = bld->mkOp2(OP_ADD, fTy, NULL, rr[1], one);
|
||||
n->setPredicate(CC_S, cc[0]);
|
||||
n->setFlagsDef(0, (cc[1] = bld->getSSA(1, FILE_FLAGS)));
|
||||
|
||||
// If there was a carry, add 1 to the upper 32 bits
|
||||
// XXX: These get executed even if they shouldn't be
|
||||
bld->mkOp2(OP_ADD, fTy, rr[2], rr[0], one)
|
||||
->setPredicate(CC_C, cc[1]);
|
||||
bld->mkMov(rr[3], rr[0])
|
||||
->setPredicate(CC_NC, cc[1]);
|
||||
bld->mkOp2(OP_UNION, fTy, rr[4], rr[2], rr[3]);
|
||||
|
||||
// Merge the results from the negative and non-negative paths
|
||||
bld->mkMov(rr[5], rr[4])
|
||||
->setPredicate(CC_S, cc[0]);
|
||||
bld->mkMov(rr[6], r[4])
|
||||
->setPredicate(CC_NS, cc[0]);
|
||||
bld->mkOp2(OP_UNION, mul->sType, mul->getDef(0), rr[5], rr[6]);
|
||||
} else {
|
||||
bld->mkMov(mul->getDef(0), r[4]);
|
||||
}
|
||||
} else {
|
||||
bld->mkMov(mul->getDef(0), t[3]);
|
||||
}
|
||||
|
@@ -418,7 +418,17 @@ ConstantFolding::expr(Instruction *i,
|
||||
case TYPE_F32: res.data.f32 = a->data.f32 * b->data.f32; break;
|
||||
case TYPE_F64: res.data.f64 = a->data.f64 * b->data.f64; break;
|
||||
case TYPE_S32:
|
||||
case TYPE_U32: res.data.u32 = a->data.u32 * b->data.u32; break;
|
||||
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {
|
||||
res.data.s32 = ((int64_t)a->data.s32 * b->data.s32) >> 32;
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
case TYPE_U32:
|
||||
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {
|
||||
res.data.u32 = ((uint64_t)a->data.u32 * b->data.u32) >> 32;
|
||||
break;
|
||||
}
|
||||
res.data.u32 = a->data.u32 * b->data.u32; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@@ -626,12 +636,41 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||
{
|
||||
const int t = !s;
|
||||
const operation op = i->op;
|
||||
Instruction *newi = i;
|
||||
|
||||
switch (i->op) {
|
||||
case OP_MUL:
|
||||
if (i->dType == TYPE_F32)
|
||||
tryCollapseChainedMULs(i, s, imm0);
|
||||
|
||||
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) {
|
||||
assert(!isFloatType(i->sType));
|
||||
if (imm0.isInteger(1) && i->dType == TYPE_S32) {
|
||||
bld.setPosition(i, false);
|
||||
// Need to set to the sign value, which is a compare.
|
||||
newi = bld.mkCmp(OP_SET, CC_LT, TYPE_S32, i->getDef(0),
|
||||
TYPE_S32, i->getSrc(t), bld.mkImm(0));
|
||||
delete_Instruction(prog, i);
|
||||
} else if (imm0.isInteger(0) || imm0.isInteger(1)) {
|
||||
// The high bits can't be set in this case (either mul by 0 or
|
||||
// unsigned by 1)
|
||||
i->op = OP_MOV;
|
||||
i->subOp = 0;
|
||||
i->setSrc(0, new_ImmediateValue(prog, 0u));
|
||||
i->src(0).mod = Modifier(0);
|
||||
i->setSrc(1, NULL);
|
||||
} else if (!imm0.isNegative() && imm0.isPow2()) {
|
||||
// Translate into a shift
|
||||
imm0.applyLog2();
|
||||
i->op = OP_SHR;
|
||||
i->subOp = 0;
|
||||
imm0.reg.data.u32 = 32 - imm0.reg.data.u32;
|
||||
i->setSrc(0, i->getSrc(t));
|
||||
i->src(0).mod = i->src(t).mod;
|
||||
i->setSrc(1, new_ImmediateValue(prog, imm0.reg.data.u32));
|
||||
i->src(1).mod = 0;
|
||||
}
|
||||
} else
|
||||
if (imm0.isInteger(0)) {
|
||||
i->op = OP_MOV;
|
||||
i->setSrc(0, new_ImmediateValue(prog, 0u));
|
||||
@@ -722,7 +761,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||
else
|
||||
tA = tB;
|
||||
tB = s ? bld.getSSA() : i->getDef(0);
|
||||
bld.mkOp2(OP_ADD, TYPE_U32, tB, mul->getDef(0), tA);
|
||||
newi = bld.mkOp2(OP_ADD, TYPE_U32, tB, mul->getDef(0), tA);
|
||||
if (s)
|
||||
bld.mkOp2(OP_SHR, TYPE_U32, i->getDef(0), tB, bld.mkImm(s));
|
||||
|
||||
@@ -754,7 +793,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||
tA = bld.getSSA();
|
||||
bld.mkCmp(OP_SET, CC_LT, TYPE_S32, tA, TYPE_S32, i->getSrc(0), bld.mkImm(0));
|
||||
tD = (d < 0) ? bld.getSSA() : i->getDef(0)->asLValue();
|
||||
bld.mkOp2(OP_SUB, TYPE_U32, tD, tB, tA);
|
||||
newi = bld.mkOp2(OP_SUB, TYPE_U32, tD, tB, tA);
|
||||
if (d < 0)
|
||||
bld.mkOp1(OP_NEG, TYPE_S32, i->getDef(0), tB);
|
||||
|
||||
@@ -832,7 +871,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if (i->op != op)
|
||||
if (newi->op != op)
|
||||
foldCount++;
|
||||
}
|
||||
|
||||
|
@@ -329,6 +329,8 @@ TargetNV50::insnCanLoad(const Instruction *i, int s,
|
||||
return false;
|
||||
if (sf == FILE_IMMEDIATE)
|
||||
return false;
|
||||
if (i->subOp == NV50_IR_SUBOP_MUL_HIGH && sf == FILE_MEMORY_CONST)
|
||||
return false;
|
||||
ldSize = 2;
|
||||
} else {
|
||||
ldSize = typeSizeof(ld->dType);
|
||||
|
@@ -3494,11 +3494,15 @@ ast_declarator_list::hir(exec_list *instructions,
|
||||
* instruction stream.
|
||||
*/
|
||||
exec_list initializer_instructions;
|
||||
|
||||
/* Examine var name here since var may get deleted in the next call */
|
||||
bool var_is_gl_id = (strncmp(var->name, "gl_", 3) == 0);
|
||||
|
||||
ir_variable *earlier =
|
||||
get_variable_being_redeclared(var, decl->get_location(), state,
|
||||
false /* allow_all_redeclarations */);
|
||||
if (earlier != NULL) {
|
||||
if (strncmp(var->name, "gl_", 3) == 0 &&
|
||||
if (var_is_gl_id &&
|
||||
earlier->data.how_declared == ir_var_declared_in_block) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"`%s' has already been redeclared using "
|
||||
|
@@ -73,11 +73,15 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
|
||||
GLint vsref = 0;
|
||||
CGLError error = 0;
|
||||
|
||||
/* Request an OpenGL 3.2 profile if one is available */
|
||||
if(apple_cgl.version_major > 1 || (apple_cgl.version_major == 1 && apple_cgl.version_minor >= 3)) {
|
||||
attr[numattr++] = kCGLPFAOpenGLProfile;
|
||||
attr[numattr++] = kCGLOGLPVersion_3_2_Core;
|
||||
}
|
||||
/* Request an OpenGL 3.2 profile if one is available and supported */
|
||||
attr[numattr++] = kCGLPFAOpenGLProfile;
|
||||
attr[numattr++] = kCGLOGLPVersion_3_2_Core;
|
||||
|
||||
/* Test for kCGLPFAOpenGLProfile support at runtime and roll it out if not supported */
|
||||
attr[numattr] = 0;
|
||||
error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
|
||||
if (error == kCGLBadAttribute)
|
||||
numattr -= 2;
|
||||
|
||||
if (offscreen) {
|
||||
apple_glx_diagnostic
|
||||
|
@@ -249,6 +249,10 @@ glx_display_free(struct glx_display *priv)
|
||||
if (priv->dri2Display)
|
||||
(*priv->dri2Display->destroyDisplay) (priv->dri2Display);
|
||||
priv->dri2Display = NULL;
|
||||
|
||||
if (priv->dri3Display)
|
||||
(*priv->dri3Display->destroyDisplay) (priv->dri3Display);
|
||||
priv->dri3Display = NULL;
|
||||
#endif
|
||||
|
||||
free((char *) priv);
|
||||
|
@@ -113,7 +113,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp) {
|
||||
|
||||
struct _glapi_table *
|
||||
_glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
|
||||
struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table));
|
||||
struct _glapi_table *disp = calloc(1, _glapi_get_dispatch_table_size() * sizeof(_glapi_proc));
|
||||
char symboln[512];
|
||||
|
||||
if(!disp)
|
||||
|
@@ -1676,7 +1676,7 @@ enum brw_message_target {
|
||||
/* GEN7/DW1: */
|
||||
# define GEN7_SF_DEPTH_BUFFER_SURFACE_FORMAT_SHIFT 12
|
||||
/* GEN7/DW2: */
|
||||
# define HSW_SF_LINE_STIPPLE_ENABLE 14
|
||||
# define HSW_SF_LINE_STIPPLE_ENABLE (1 << 14)
|
||||
|
||||
# define GEN8_SF_SMOOTH_POINT_ENABLE (1 << 13)
|
||||
|
||||
|
@@ -42,6 +42,13 @@ brw_get_graphics_reset_status(struct gl_context *ctx)
|
||||
*/
|
||||
assert(brw->hw_ctx != NULL);
|
||||
|
||||
/* A reset status other than NO_ERROR was returned last time. I915 returns
|
||||
* nonzero active/pending only if reset has been encountered and completed.
|
||||
* Return NO_ERROR from now on.
|
||||
*/
|
||||
if (brw->reset_count != 0)
|
||||
return GL_NO_ERROR;
|
||||
|
||||
err = drm_intel_get_reset_stats(brw->hw_ctx, &reset_count, &active,
|
||||
&pending);
|
||||
if (err)
|
||||
@@ -50,18 +57,19 @@ brw_get_graphics_reset_status(struct gl_context *ctx)
|
||||
/* A reset was observed while a batch from this context was executing.
|
||||
* Assume that this context was at fault.
|
||||
*/
|
||||
if (active != 0)
|
||||
if (active != 0) {
|
||||
brw->reset_count = reset_count;
|
||||
return GL_GUILTY_CONTEXT_RESET_ARB;
|
||||
}
|
||||
|
||||
/* A reset was observed while a batch from this context was in progress,
|
||||
* but the batch was not executing. In this case, assume that the context
|
||||
* was not at fault.
|
||||
*/
|
||||
if (pending != 0)
|
||||
if (pending != 0) {
|
||||
brw->reset_count = reset_count;
|
||||
return GL_INNOCENT_CONTEXT_RESET_ARB;
|
||||
|
||||
/* FINISHME: Should we report anything if reset_count > brw->reset_count?
|
||||
*/
|
||||
}
|
||||
|
||||
return GL_NO_ERROR;
|
||||
}
|
||||
|
@@ -500,6 +500,12 @@ _mesa_framebuffer_renderbuffer(struct gl_context *ctx,
|
||||
}
|
||||
else {
|
||||
remove_attachment(ctx, att);
|
||||
if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
|
||||
/* detach stencil (depth was detached above) */
|
||||
att = get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT);
|
||||
assert(att);
|
||||
remove_attachment(ctx, att);
|
||||
}
|
||||
}
|
||||
|
||||
invalidate_framebuffer(fb);
|
||||
|
Reference in New Issue
Block a user