зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1306172 - Don't pass LINE_WIDTH>1.0 to core profiles. - r=jerry
This commit is contained in:
Родитель
8e0a37ee0b
Коммит
220518855d
|
@ -1523,6 +1523,8 @@ protected:
|
|||
GLsizei mViewportHeight;
|
||||
bool mAlreadyWarnedAboutViewportLargerThanDest;
|
||||
|
||||
GLfloat mLineWidth;
|
||||
|
||||
WebGLContextLossHandler mContextLossHandler;
|
||||
bool mAllowContextRestore;
|
||||
bool mLastLossWasSimulated;
|
||||
|
|
|
@ -2408,6 +2408,12 @@ WebGLContext::LineWidth(GLfloat width)
|
|||
return;
|
||||
}
|
||||
|
||||
mLineWidth = width;
|
||||
|
||||
if (gl->IsCoreProfile() && width > 1.0) {
|
||||
width = 1.0;
|
||||
}
|
||||
|
||||
MakeContextCurrent();
|
||||
gl->fLineWidth(width);
|
||||
}
|
||||
|
|
|
@ -509,8 +509,10 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv)
|
|||
return JS::DoubleValue(mStencilWriteMaskFront);
|
||||
|
||||
// float
|
||||
case LOCAL_GL_DEPTH_CLEAR_VALUE:
|
||||
case LOCAL_GL_LINE_WIDTH:
|
||||
return JS::DoubleValue(mLineWidth);
|
||||
|
||||
case LOCAL_GL_DEPTH_CLEAR_VALUE:
|
||||
case LOCAL_GL_POLYGON_OFFSET_FACTOR:
|
||||
case LOCAL_GL_POLYGON_OFFSET_UNITS:
|
||||
case LOCAL_GL_SAMPLE_COVERAGE_VALUE: {
|
||||
|
|
|
@ -672,6 +672,8 @@ WebGLContext::InitAndValidateGL(FailureReason* const out_failReason)
|
|||
mStencilRefFront = 0;
|
||||
mStencilRefBack = 0;
|
||||
|
||||
mLineWidth = 1.0;
|
||||
|
||||
/*
|
||||
// Technically, we should be setting mStencil[...] values to
|
||||
// `allOnes`, but either ANGLE breaks or the SGX540s on Try break.
|
||||
|
|
Загрузка…
Ссылка в новой задаче