diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-17 18:00:03 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-17 18:00:03 (GMT) |
commit | 91a1f7a1c408052b1d284d6b901819964e338fe5 (patch) | |
tree | df7103f0ea0cb9d98f4b641d72c0f8b0ebdf2498 /src/opengl/gl2paintengineex | |
parent | 94a3356d5eb7b255d439efe2699bf3a9b025e8eb (diff) | |
parent | 509ef11ab4ba6165c16d9d311c4a1bf7cdfd2528 (diff) | |
download | Qt-91a1f7a1c408052b1d284d6b901819964e338fe5.zip Qt-91a1f7a1c408052b1d284d6b901819964e338fe5.tar.gz Qt-91a1f7a1c408052b1d284d6b901819964e338fe5.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
demos/demos.pro
mkspecs/features/resources.prf
mkspecs/features/uic.prf
src/corelib/io/qurl.cpp
src/corelib/tools/qlocale_symbian.cpp
src/gui/graphicsview/qgraphicsscene.cpp
src/gui/graphicsview/qgraphicswidget_p.cpp
src/gui/graphicsview/qgraphicswidget_p.h
src/gui/util/qsystemtrayicon_win.cpp
src/multimedia/audio/qaudioinput.cpp
tests/auto/qhostinfo/qhostinfo.pro
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 10 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadersource_p.h | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index ac25597..40b3641 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -266,10 +266,12 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS do { QByteArray source; - source.append(qShaderSnippets[prog.mainFragShader]); - source.append(qShaderSnippets[prog.srcPixelFragShader]); + // Insert the custom stage before the srcPixel shader to work around an ATI driver bug + // where you cannot forward declare a function that takes a sampler as argument. if (prog.srcPixelFragShader == CustomImageSrcFragmentShader) source.append(prog.customStageSource); + source.append(qShaderSnippets[prog.mainFragShader]); + source.append(qShaderSnippets[prog.srcPixelFragShader]); if (prog.compositionFragShader) source.append(qShaderSnippets[prog.compositionFragShader]); if (prog.maskFragShader) @@ -777,8 +779,8 @@ bool QGLEngineShaderManager::useCorrectShaderProg() // doesn't use are disabled) QGLContextPrivate* ctx_d = ctx->d_func(); ctx_d->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, true); - ctx_d->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, currentShaderProg->useTextureCoords); - ctx_d->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, currentShaderProg->useOpacityAttribute); + ctx_d->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, currentShaderProg && currentShaderProg->useTextureCoords); + ctx_d->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, currentShaderProg && currentShaderProg->useOpacityAttribute); shaderProgNeedsChanging = false; return true; diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index 8dba951..a7ece0f 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -351,7 +351,6 @@ static const char* const qglslImageSrcFragmentShader = "\n\ static const char* const qglslCustomSrcFragmentShader = "\n\ varying highp vec2 textureCoords; \n\ uniform lowp sampler2D imageTexture; \n\ - lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \n\ lowp vec4 srcPixel() \n\ { \n\ return customShader(imageTexture, textureCoords); \n\ |