summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/effects/qgraphicseffect.cpp52
-rw-r--r--src/gui/image/qimage.cpp3
-rw-r--r--src/gui/image/qpixmap.cpp28
-rw-r--r--src/gui/image/qpixmap_mac.cpp5
-rw-r--r--src/gui/image/qpixmap_mac_p.h2
-rw-r--r--src/gui/image/qpixmap_raster.cpp28
-rw-r--r--src/gui/image/qpixmap_raster_p.h2
-rw-r--r--src/gui/image/qpixmap_x11.cpp5
-rw-r--r--src/gui/image/qpixmap_x11_p.h2
-rw-r--r--src/gui/image/qpixmapdata.cpp13
-rw-r--r--src/gui/image/qpixmapdata_p.h4
-rw-r--r--src/gui/image/qpixmapfilter.cpp51
-rw-r--r--src/gui/kernel/qwidget.cpp7
-rw-r--r--src/gui/kernel/qwidget_x11.cpp71
-rw-r--r--src/gui/painting/qblendfunctions.cpp4
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
-rw-r--r--src/gui/painting/qpainter.cpp64
-rw-r--r--src/gui/painting/qrasterizer.cpp6
-rw-r--r--src/gui/painting/qstroker.cpp39
-rw-r--r--src/gui/painting/qstroker_p.h15
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadersource_p.h1
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp10
-rw-r--r--src/opengl/qgl.cpp48
-rw-r--r--src/opengl/qglframebufferobject.cpp20
-rw-r--r--src/opengl/qglframebufferobject_p.h2
-rw-r--r--src/opengl/qpaintengine_opengl.cpp29
-rw-r--r--src/opengl/qpixmapdata_gl.cpp31
-rw-r--r--src/opengl/qpixmapdata_gl_p.h2
-rw-r--r--src/opengl/qwindowsurface_gl.cpp6
-rw-r--r--src/opengl/util/composition_mode_colorburn.glsl4
-rw-r--r--src/opengl/util/composition_mode_colordodge.glsl4
-rw-r--r--src/opengl/util/composition_mode_darken.glsl2
-rw-r--r--src/opengl/util/composition_mode_difference.glsl2
-rw-r--r--src/opengl/util/composition_mode_exclusion.glsl2
-rw-r--r--src/opengl/util/composition_mode_hardlight.glsl6
-rw-r--r--src/opengl/util/composition_mode_lighten.glsl2
-rw-r--r--src/opengl/util/composition_mode_multiply.glsl2
-rw-r--r--src/opengl/util/composition_mode_overlay.glsl6
-rw-r--r--src/opengl/util/composition_mode_softlight.glsl10
-rw-r--r--src/opengl/util/conical_brush.glsl2
-rw-r--r--src/opengl/util/ellipse.glsl6
-rw-r--r--src/opengl/util/ellipse_aa.glsl56
-rw-r--r--src/opengl/util/ellipse_aa_copy.glsl11
-rw-r--r--src/opengl/util/ellipse_aa_radial.glsl24
-rw-r--r--src/opengl/util/ellipse_functions.glsl63
-rw-r--r--src/opengl/util/fragmentprograms_p.h2069
-rw-r--r--src/opengl/util/generator.cpp53
-rw-r--r--src/opengl/util/masks.conf1
-rw-r--r--src/opengl/util/pattern_brush.glsl4
-rw-r--r--src/opengl/util/simple_porter_duff.glsl6
-rw-r--r--src/opengl/util/trap_exact_aa.glsl12
-rw-r--r--src/openvg/qpixmapdata_vg.cpp5
-rw-r--r--src/openvg/qpixmapdata_vg_p.h2
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp40
54 files changed, 1557 insertions, 1389 deletions
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index ee01fdc..91641b0 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -105,6 +105,7 @@
#include <QtGui/qpainter.h>
#include <QtCore/qrect.h>
#include <QtCore/qdebug.h>
+#include <private/qdrawhelper_p.h>
QT_BEGIN_NAMESPACE
@@ -893,15 +894,8 @@ void QGraphicsBlurEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
return;
}
- QPoint offset;
- if (source->isPixmap()) {
- // No point in drawing in device coordinates (pixmap will be scaled anyways).
- const QPixmap pixmap = source->pixmap(Qt::LogicalCoordinates, &offset);
- d->filter->draw(painter, offset, pixmap);
- return;
- }
-
// Draw pixmap in device coordinates to avoid pixmap scaling.
+ QPoint offset;
const QPixmap pixmap = source->pixmap(Qt::DeviceCoordinates, &offset);
QTransform restoreTransform = painter->worldTransform();
painter->setWorldTransform(QTransform());
@@ -1084,15 +1078,8 @@ void QGraphicsDropShadowEffect::draw(QPainter *painter, QGraphicsEffectSource *s
return;
}
- QPoint offset;
- if (source->isPixmap()) {
- // No point in drawing in device coordinates (pixmap will be scaled anyways).
- const QPixmap pixmap = source->pixmap(Qt::LogicalCoordinates, &offset);
- d->filter->draw(painter, offset, pixmap);
- return;
- }
-
// Draw pixmap in device coordinates to avoid pixmap scaling.
+ QPoint offset;
const QPixmap pixmap = source->pixmap(Qt::DeviceCoordinates, &offset);
QTransform restoreTransform = painter->worldTransform();
painter->setWorldTransform(QTransform());
@@ -1475,6 +1462,8 @@ void QGraphicsBloomEffect::setStrength(qreal strength)
The \a strength parameter holds the effect's new strength.
*/
+extern QPixmap qt_toRasterPixmap(const QPixmap &pixmap);
+
/*!
\reimp
*/
@@ -1486,42 +1475,37 @@ void QGraphicsBloomEffect::draw(QPainter *painter, QGraphicsEffectSource *source
return;
}
- const Qt::CoordinateSystem system = source->isPixmap()
- ? Qt::LogicalCoordinates : Qt::DeviceCoordinates;
QPoint offset;
- QPixmap pixmap = source->pixmap(system, &offset);
- QImage result = pixmap.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ QPixmap pixmap = qt_toRasterPixmap(source->pixmap(Qt::DeviceCoordinates, &offset));
// Blur.
- QPainter blurPainter(&pixmap);
+ QImage overlay(pixmap.size(), QImage::Format_ARGB32_Premultiplied);
+ overlay.fill(0);
+
+ QPainter blurPainter(&overlay);
d->blurFilter.draw(&blurPainter, QPointF(), pixmap);
blurPainter.end();
// Brighten.
- QImage overlay = pixmap.toImage().convertToFormat(QImage::Format_ARGB32);
const int numBits = overlay.width() * overlay.height();
QRgb *bits = reinterpret_cast<QRgb *>(overlay.bits());
for (int i = 0; i < numBits; ++i) {
- const QRgb bit = bits[i];
- bits[i] = qRgba(d->colorTable[qRed(bit)], d->colorTable[qGreen(bit)],
- d->colorTable[qBlue(bit)], qAlpha(bit));
+ const QRgb pixel = INV_PREMUL(bits[i]);
+ bits[i] = PREMUL(qRgba(d->colorTable[qRed(pixel)], d->colorTable[qGreen(pixel)],
+ d->colorTable[qBlue(pixel)], qAlpha(pixel)));
}
// Composite.
- QPainter compPainter(&result);
+ QPainter compPainter(&pixmap);
compPainter.setCompositionMode(QPainter::CompositionMode_Overlay);
compPainter.setOpacity(d->strength);
compPainter.drawImage(0, 0, overlay);
compPainter.end();
- if (system == Qt::DeviceCoordinates) {
- QTransform restoreTransform = painter->worldTransform();
- painter->setWorldTransform(QTransform());
- painter->drawImage(offset, result);
- painter->setWorldTransform(restoreTransform);
- } else {
- painter->drawImage(offset, result);
- }
+ QTransform restoreTransform = painter->worldTransform();
+ painter->setWorldTransform(QTransform());
+ painter->drawPixmap(offset, pixmap);
+ painter->setWorldTransform(restoreTransform);
}
QT_END_NAMESPACE
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 9048387..21ab40c 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -377,6 +377,9 @@ bool QImageData::checkForAlphaPixels() const
\note If you would like to load QImage objects in a static build of Qt,
refer to the \l{How To Create Qt Plugins#Static Plugins}{Plugin HowTo}.
+ \warning Painting on a QImage with the format
+ QImage::Format_Indexed8 is not supported.
+
\tableofcontents
\section1 Reading and Writing Image Files
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 558ae54..c03a364 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -361,13 +361,7 @@ QPixmap QPixmap::copy(const QRect &rect) const
const QRect r = rect.isEmpty() ? QRect(0, 0, width(), height()) : rect;
- QPixmapData *d;
- QGraphicsSystem* gs = QApplicationPrivate::graphicsSystem();
- if (gs)
- d = gs->createPixmapData(data->pixelType());
- else
- d = QGraphicsSystem::createDefaultPixmapData(data->pixelType());
-
+ QPixmapData *d = data->createCompatiblePixmapData();
d->copy(data.data(), r);
return QPixmap(d);
}
@@ -947,6 +941,9 @@ bool QPixmap::doImageIO(QImageWriter *writer, int quality) const
/*!
Fills the pixmap with the given \a color.
+ The effect of this function is undefined when the pixmap is
+ being painted on.
+
\sa {QPixmap#Pixmap Transformations}{Pixmap Transformations}
*/
@@ -955,6 +952,13 @@ void QPixmap::fill(const QColor &color)
if (isNull())
return;
+ // Some people are probably already calling fill while a painter is active, so to not break
+ // their programs, only print a warning and return when the fill operation could cause a crash.
+ if (paintingActive() && (color.alpha() != 255) && !hasAlphaChannel()) {
+ qWarning("QPixmap::fill: Cannot fill while pixmap is being painted on");
+ return;
+ }
+
detach();
data->fill(color);
}
@@ -1663,10 +1667,10 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
identifies the contents of the QPixmap object.
The x11Info() function returns information about the configuration
- of the X display used to display the widget. The
- x11PictureHandle() function returns the X11 Picture handle of the
- pixmap for XRender support. Note that the two latter functions are
- only available on x11.
+ of the X display used by the screen to which the pixmap currently
+ belongs. The x11PictureHandle() function returns the X11 Picture
+ handle of the pixmap for XRender support. Note that the two latter
+ functions are only available on x11.
\endtable
@@ -2084,7 +2088,7 @@ QPixmapData* QPixmap::pixmapData() const
/*! \fn const QX11Info &QPixmap::x11Info() const
\bold{X11 only:} Returns information about the configuration of
- the X display used to display the widget.
+ the X display used by the screen to which the pixmap currently belongs.
\warning This function is only available on X11.
diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp
index de532fd..afa6f83 100644
--- a/src/gui/image/qpixmap_mac.cpp
+++ b/src/gui/image/qpixmap_mac.cpp
@@ -166,6 +166,11 @@ QMacPixmapData::QMacPixmapData(PixelType type)
{
}
+QPixmapData *QMacPixmapData::createCompatiblePixmapData() const
+{
+ return new QMacPixmapData(pixelType());
+}
+
#define BEST_BYTE_ALIGNMENT 16
#define COMPTUE_BEST_BYTES_PER_ROW(bpr) \
(((bpr) + (BEST_BYTE_ALIGNMENT - 1)) & ~(BEST_BYTE_ALIGNMENT - 1))
diff --git a/src/gui/image/qpixmap_mac_p.h b/src/gui/image/qpixmap_mac_p.h
index 528dd1f..a3fb95f 100644
--- a/src/gui/image/qpixmap_mac_p.h
+++ b/src/gui/image/qpixmap_mac_p.h
@@ -65,6 +65,8 @@ public:
QMacPixmapData(PixelType type);
~QMacPixmapData();
+ QPixmapData *createCompatiblePixmapData() const;
+
void resize(int width, int height);
void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
void copy(const QPixmapData *data, const QRect &rect);
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index ad68b07..fc76dc3 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -55,6 +55,29 @@ QT_BEGIN_NAMESPACE
const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08,
0x10, 0x20, 0x40, 0x80 };
+QPixmap qt_toRasterPixmap(const QImage &image)
+{
+ QPixmapData *data =
+ new QRasterPixmapData(image.depth() == 1
+ ? QPixmapData::BitmapType
+ : QPixmapData::PixmapType);
+
+ data->fromImage(image, Qt::AutoColor);
+
+ return QPixmap(data);
+}
+
+QPixmap qt_toRasterPixmap(const QPixmap &pixmap)
+{
+ if (pixmap.isNull())
+ return QPixmap();
+
+ if (QPixmap(pixmap).data_ptr()->classId() == QPixmapData::RasterClass)
+ return pixmap;
+
+ return qt_toRasterPixmap(pixmap.toImage());
+}
+
QRasterPixmapData::QRasterPixmapData(PixelType type)
: QPixmapData(type, RasterClass)
{
@@ -64,6 +87,11 @@ QRasterPixmapData::~QRasterPixmapData()
{
}
+QPixmapData *QRasterPixmapData::createCompatiblePixmapData() const
+{
+ return new QRasterPixmapData(pixelType());
+}
+
void QRasterPixmapData::resize(int width, int height)
{
QImage::Format format;
diff --git a/src/gui/image/qpixmap_raster_p.h b/src/gui/image/qpixmap_raster_p.h
index da0405e..1553940 100644
--- a/src/gui/image/qpixmap_raster_p.h
+++ b/src/gui/image/qpixmap_raster_p.h
@@ -68,6 +68,8 @@ public:
QRasterPixmapData(PixelType type);
~QRasterPixmapData();
+ QPixmapData *createCompatiblePixmapData() const;
+
void resize(int width, int height);
void fromFile(const QString &filename, Qt::ImageConversionFlags flags);
void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 74543a0..ea9eff9 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -319,6 +319,11 @@ QX11PixmapData::QX11PixmapData(PixelType type)
{
}
+QPixmapData *QX11PixmapData::createCompatiblePixmapData() const
+{
+ return new QX11PixmapData(pixelType());
+}
+
void QX11PixmapData::resize(int width, int height)
{
setSerialNumber(++qt_pixmap_serial);
diff --git a/src/gui/image/qpixmap_x11_p.h b/src/gui/image/qpixmap_x11_p.h
index e34e690..2d6672d 100644
--- a/src/gui/image/qpixmap_x11_p.h
+++ b/src/gui/image/qpixmap_x11_p.h
@@ -71,6 +71,8 @@ public:
// Qt::ImageConversionFlags flags);
~QX11PixmapData();
+ QPixmapData *createCompatiblePixmapData() const;
+
void resize(int width, int height);
void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
void copy(const QPixmapData *data, const QRect &rect);
diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp
index 93fc2eb..1ad1f02 100644
--- a/src/gui/image/qpixmapdata.cpp
+++ b/src/gui/image/qpixmapdata.cpp
@@ -43,6 +43,8 @@
#include <QtCore/qbuffer.h>
#include <QtGui/qbitmap.h>
#include <QtGui/qimagereader.h>
+#include <private/qgraphicssystem_p.h>
+#include <private/qapplication_p.h>
QT_BEGIN_NAMESPACE
@@ -67,6 +69,17 @@ QPixmapData::~QPixmapData()
{
}
+QPixmapData *QPixmapData::createCompatiblePixmapData() const
+{
+ QPixmapData *d;
+ QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
+ if (gs)
+ d = gs->createPixmapData(pixelType());
+ else
+ d = QGraphicsSystem::createDefaultPixmapData(pixelType());
+ return d;
+}
+
static QImage makeBitmapCompliantIfNeeded(QPixmapData *d, const QImage &image, Qt::ImageConversionFlags flags)
{
if (d->pixelType() == QPixmapData::BitmapType) {
diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h
index c26fba3..2f4f201 100644
--- a/src/gui/image/qpixmapdata_p.h
+++ b/src/gui/image/qpixmapdata_p.h
@@ -75,9 +75,11 @@ public:
enum ClassId { RasterClass, X11Class, MacClass, DirectFBClass,
OpenGLClass, OpenVGClass, CustomClass = 1024 };
- QPixmapData(PixelType pixelpType, int classId);
+ QPixmapData(PixelType pixelType, int classId);
virtual ~QPixmapData();
+ virtual QPixmapData *createCompatiblePixmapData() const;
+
virtual void resize(int width, int height) = 0;
virtual void fromImage(const QImage &image,
Qt::ImageConversionFlags flags) = 0;
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index df445db..9fcf776 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -591,7 +591,7 @@ QRectF QPixmapBlurFilter::boundingRectFor(const QRectF &rect) const
// Blur the image according to the blur radius
// Based on exponential blur algorithm by Jani Huhtanen
// (maximum radius is set to 16)
-static QImage blurred(const QImage& image, const QRect& rect, int radius)
+static QImage blurred(const QImage& image, const QRect& rect, int radius, bool alphaOnly = false)
{
int tab[] = { 14, 10, 8, 6, 5, 5, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2 };
int alpha = (radius < 1) ? 16 : (radius > 17) ? 1 : tab[radius-1];
@@ -606,47 +606,53 @@ static QImage blurred(const QImage& image, const QRect& rect, int radius)
int rgba[4];
unsigned char* p;
+ int i1 = 0;
+ int i2 = 3;
+
+ if (alphaOnly)
+ i1 = i2 = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3);
+
for (int col = c1; col <= c2; col++) {
p = result.scanLine(r1) + col * 4;
- for (int i = 0; i < 4; i++)
+ for (int i = i1; i <= i2; i++)
rgba[i] = p[i] << 4;
p += bpl;
for (int j = r1; j < r2; j++, p += bpl)
- for (int i = 0; i < 4; i++)
+ for (int i = i1; i <= i2; i++)
p[i] = (rgba[i] += ((p[i] << 4) - rgba[i]) * alpha / 16) >> 4;
}
for (int row = r1; row <= r2; row++) {
p = result.scanLine(row) + c1 * 4;
- for (int i = 0; i < 4; i++)
+ for (int i = i1; i <= i2; i++)
rgba[i] = p[i] << 4;
p += 4;
for (int j = c1; j < c2; j++, p += 4)
- for (int i = 0; i < 4; i++)
+ for (int i = i1; i <= i2; i++)
p[i] = (rgba[i] += ((p[i] << 4) - rgba[i]) * alpha / 16) >> 4;
}
for (int col = c1; col <= c2; col++) {
p = result.scanLine(r2) + col * 4;
- for (int i = 0; i < 4; i++)
+ for (int i = i1; i <= i2; i++)
rgba[i] = p[i] << 4;
p -= bpl;
for (int j = r1; j < r2; j++, p -= bpl)
- for (int i = 0; i < 4; i++)
+ for (int i = i1; i <= i2; i++)
p[i] = (rgba[i] += ((p[i] << 4) - rgba[i]) * alpha / 16) >> 4;
}
for (int row = r1; row <= r2; row++) {
p = result.scanLine(row) + c2 * 4;
- for (int i = 0; i < 4; i++)
+ for (int i = i1; i <= i2; i++)
rgba[i] = p[i] << 4;
p -= 4;
for (int j = c1; j < c2; j++, p -= 4)
- for (int i = 0; i < 4; i++)
+ for (int i = i1; i <= i2; i++)
p[i] = (rgba[i] += ((p[i] << 4) - rgba[i]) * alpha / 16) >> 4;
}
@@ -892,11 +898,11 @@ class QPixmapDropShadowFilterPrivate : public QPixmapFilterPrivate
{
public:
QPixmapDropShadowFilterPrivate()
- : offset(8, 8), color(63, 63, 63, 180), blurFilter(new QPixmapBlurFilter) {}
+ : offset(8, 8), color(63, 63, 63, 180), radius(1) {}
QPointF offset;
QColor color;
- QPixmapBlurFilter *blurFilter;
+ int radius;
};
/*!
@@ -940,8 +946,6 @@ public:
QPixmapDropShadowFilter::QPixmapDropShadowFilter(QObject *parent)
: QPixmapFilter(*new QPixmapDropShadowFilterPrivate, DropShadowFilter, parent)
{
- Q_D(QPixmapDropShadowFilter);
- d->blurFilter->setRadius(1);
}
/*!
@@ -951,8 +955,6 @@ QPixmapDropShadowFilter::QPixmapDropShadowFilter(QObject *parent)
*/
QPixmapDropShadowFilter::~QPixmapDropShadowFilter()
{
- Q_D(QPixmapDropShadowFilter);
- delete d->blurFilter;
}
/*!
@@ -967,7 +969,7 @@ QPixmapDropShadowFilter::~QPixmapDropShadowFilter()
int QPixmapDropShadowFilter::blurRadius() const
{
Q_D(const QPixmapDropShadowFilter);
- return d->blurFilter->radius();
+ return d->radius;
}
/*!
@@ -982,7 +984,7 @@ int QPixmapDropShadowFilter::blurRadius() const
void QPixmapDropShadowFilter::setBlurRadius(int radius)
{
Q_D(QPixmapDropShadowFilter);
- d->blurFilter->setRadius(radius);
+ d->radius = radius;
}
/*!
@@ -1056,7 +1058,7 @@ QRectF QPixmapDropShadowFilter::boundingRectFor(const QRectF &rect) const
{
Q_D(const QPixmapDropShadowFilter);
- const qreal delta = qreal(d->blurFilter->radius() * 2);
+ const qreal delta = qreal(d->radius * 2);
qreal x1 = qMin(rect.left(), rect.left() + d->offset.x() - delta);
qreal y1 = qMin(rect.top(), rect.top() + d->offset.y() - delta);
qreal x2 = qMax(rect.right(), rect.right() + d->offset.x() + delta);
@@ -1079,24 +1081,25 @@ void QPixmapDropShadowFilter::draw(QPainter *p,
QPixmapDropShadowFilter *dropShadowFilter = static_cast<QPixmapDropShadowFilter*>(filter);
if (dropShadowFilter) {
dropShadowFilter->setColor(d->color);
- dropShadowFilter->setBlurRadius(d->blurFilter->radius());
+ dropShadowFilter->setBlurRadius(d->radius);
dropShadowFilter->setOffset(d->offset);
dropShadowFilter->draw(p, pos, px, src);
return;
}
- QImage tmp = src.isNull() ? px.toImage() : px.copy(src.toRect()).toImage();
- QPainter tmpPainter(&tmp);
+ QImage tmp = src.isNull() ? px.toImage() : px.copy(src.toAlignedRect()).toImage();
+
+ // blur the alpha channel
+ tmp = blurred(tmp, tmp.rect(), d->radius, true);
// blacken the image...
+ QPainter tmpPainter(&tmp);
tmpPainter.setCompositionMode(QPainter::CompositionMode_SourceIn);
tmpPainter.fillRect(0, 0, tmp.width(), tmp.height(), d->color);
tmpPainter.end();
- const QPixmap pixTmp = QPixmap::fromImage(tmp);
-
// draw the blurred drop shadow...
- d->blurFilter->draw(p, pos + d->offset, pixTmp);
+ p->drawImage(pos + d->offset, tmp);
// Draw the actual pixmap...
p->drawPixmap(pos, px, src);
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 8da415f..de08312 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -1355,6 +1355,8 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow)
d->setWindowIcon_sys(true);
if (isWindow() && !d->topData()->iconText.isEmpty())
d->setWindowIconText_helper(d->topData()->iconText);
+ if (isWindow() && !d->topData()->caption.isEmpty())
+ d->setWindowTitle_helper(d->topData()->caption);
if (windowType() != Qt::Desktop) {
d->updateSystemBackground();
@@ -5677,9 +5679,8 @@ QString qt_setWindowTitle_helperHelper(const QString &title, const QWidget *widg
void QWidgetPrivate::setWindowTitle_helper(const QString &title)
{
Q_Q(QWidget);
- if (!q->testAttribute(Qt::WA_WState_Created))
- createWinId();
- setWindowTitle_sys(qt_setWindowTitle_helperHelper(title, q));
+ if (q->testAttribute(Qt::WA_WState_Created))
+ setWindowTitle_sys(qt_setWindowTitle_helperHelper(title, q));
}
void QWidgetPrivate::setWindowIconText_helper(const QString &title)
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 283dfb2..663178f 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -518,14 +518,18 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (!window)
initializeWindow = true;
+ QX11Info *parentXinfo = parentWidget ? &parentWidget->d_func()->xinfo : 0;
+
if (desktop &&
qt_x11_create_desktop_on_screen >= 0 &&
qt_x11_create_desktop_on_screen != xinfo.screen()) {
// desktop on a certain screen other than the default requested
QX11InfoData *xd = &X11->screens[qt_x11_create_desktop_on_screen];
xinfo.setX11Data(xd);
- } else if (parentWidget && parentWidget->d_func()->xinfo.screen() != xinfo.screen()) {
- xinfo = parentWidget->d_func()->xinfo;
+ } else if (parentXinfo && (parentXinfo->screen() != xinfo.screen()
+ || parentXinfo->visual() != xinfo.visual()))
+ {
+ xinfo = *parentXinfo;
}
//get display, screen number, root window and desktop geometry for
@@ -920,6 +924,43 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
#endif
}
+static void qt_x11_recreateWidget(QWidget *widget)
+{
+ if (widget->inherits("QGLWidget")) {
+ // We send QGLWidgets a ParentChange event which causes them to
+ // recreate their GL context, which in turn causes them to choose
+ // their visual again. Now that WA_TranslucentBackground is set,
+ // QGLContext::chooseVisual will select an ARGB visual.
+ QEvent e(QEvent::ParentChange);
+ QApplication::sendEvent(widget, &e);
+ } else {
+ // For regular widgets, reparent them with their parent which
+ // also triggers a recreation of the native window
+ QPoint pos = widget->pos();
+ bool visible = widget->isVisible();
+ if (visible)
+ widget->hide();
+
+ widget->setParent(widget->parentWidget(), widget->windowFlags());
+ widget->move(pos);
+ if (visible)
+ widget->show();
+ }
+}
+
+static void qt_x11_recreateNativeWidgetsRecursive(QWidget *widget)
+{
+ if (widget->testAttribute(Qt::WA_NativeWindow))
+ qt_x11_recreateWidget(widget);
+
+ const QObjectList &children = widget->children();
+ for (int i = 0; i < children.size(); ++i) {
+ QWidget *child = qobject_cast<QWidget*>(children.at(i));
+ if (child)
+ qt_x11_recreateNativeWidgetsRecursive(child);
+ }
+}
+
void QWidgetPrivate::x11UpdateIsOpaque()
{
#ifndef QT_NO_XRENDER
@@ -930,29 +971,9 @@ void QWidgetPrivate::x11UpdateIsOpaque()
bool topLevel = (data.window_flags & Qt::Window);
int screen = xinfo.screen();
if (topLevel && X11->use_xrender
- && X11->argbVisuals[screen] && xinfo.depth() != 32) {
-
- if (q->inherits("QGLWidget")) {
- // We send QGLWidgets a ParentChange event which causes them to
- // recreate their GL context, which in turn causes them to choose
- // their visual again. Now that WA_TranslucentBackground is set,
- // QGLContext::chooseVisual will select an ARGB visual.
- QEvent e(QEvent::ParentChange);
- QApplication::sendEvent(q, &e);
- }
- else {
- // For regular widgets, reparent them with their parent which
- // also triggers a recreation of the native window
- QPoint pos = q->pos();
- bool visible = q->isVisible();
- if (visible)
- q->hide();
-
- q->setParent(q->parentWidget(), q->windowFlags());
- q->move(pos);
- if (visible)
- q->show();
- }
+ && X11->argbVisuals[screen] && xinfo.depth() != 32)
+ {
+ qt_x11_recreateNativeWidgetsRecursive(q);
}
#endif
}
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 89adaf5..f8dd424 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -374,9 +374,9 @@ template <typename T> void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl,
const uchar *src = srcPixels + y * sbpl;
const uchar *srcEnd = src + srcOffset;
while (src < srcEnd) {
-#if defined(QT_ARCH_ARM) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_))
+#if defined(QT_ARCH_ARM) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) || (defined(QT_ARCH_SPARC) && defined(Q_CC_GNU))
// non-16-bit aligned memory access is not possible on PowerPC,
- // ARM <v6 (QT_ARCH_ARMV6) & SH & AVR32
+ // ARM <v6 (QT_ARCH_ARMV6) & SH & AVR32 & SPARC w/GCC
quint16 spix = (quint16(src[2])<<8) + src[1];
#else
quint16 spix = *(quint16 *) (src + 1);
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 240403d..fab2d8d 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2376,6 +2376,7 @@ void QRasterPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pixmap)
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
if (s->matrix.type() <= QTransform::TxTranslate) {
+ ensurePen();
drawBitmap(pos + QPointF(s->matrix.dx(), s->matrix.dy()), image, &s->penData);
} else {
drawImage(pos, d->rasterBuffer->colorizeBitmap(image, s->pen.color()));
@@ -2389,6 +2390,7 @@ void QRasterPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pixmap)
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
if (s->matrix.type() <= QTransform::TxTranslate) {
+ ensurePen();
drawBitmap(pos + QPointF(s->matrix.dx(), s->matrix.dy()), image, &s->penData);
} else {
drawImage(pos, d->rasterBuffer->colorizeBitmap(image, s->pen.color()));
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index f271af9..cddad7d 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1608,9 +1608,21 @@ void QPainter::restore()
\warning A paint device can only be painted by one painter at a
time.
+ \warning Painting on a QImage with the format
+ QImage::Format_Indexed8 is not supported.
+
\sa end(), QPainter()
*/
+static inline void qt_cleanup_painter_state(QPainterPrivate *d)
+{
+ d->states.clear();
+ delete d->state;
+ d->state = 0;
+ d->engine = 0;
+ d->device = 0;
+}
+
bool QPainter::begin(QPaintDevice *pd)
{
Q_ASSERT(pd);
@@ -1656,15 +1668,21 @@ bool QPainter::begin(QPaintDevice *pd)
printf("QPainter::begin(), device=%p, type=%d\n", pd, pd->devType());
#endif
-
- d->device = pd;
if (pd->devType() == QInternal::Pixmap)
static_cast<QPixmap *>(pd)->detach();
else if (pd->devType() == QInternal::Image)
static_cast<QImage *>(pd)->detach();
d->engine = pd->paintEngine();
- d->extended = d->engine && d->engine->isExtended() ? static_cast<QPaintEngineEx *>(d->engine) : 0;
+
+ if (!d->engine) {
+ qWarning("QPainter::begin: Paint device returned engine == 0, type: %d", pd->devType());
+ return false;
+ }
+
+ d->device = pd;
+
+ d->extended = d->engine->isExtended() ? static_cast<QPaintEngineEx *>(d->engine) : 0;
if (d->emulationEngine)
d->emulationEngine->real_engine = d->extended;
@@ -1677,11 +1695,6 @@ bool QPainter::begin(QPaintDevice *pd)
d->state->redirectionMatrix.translate(-redirectionOffset.x(), -redirectionOffset.y());
d->state->brushOrigin = QPointF();
- if (!d->engine) {
- qWarning("QPainter::begin: Paint device returned engine == 0, type: %d", pd->devType());
- return false;
- }
-
// Slip a painter state into the engine before we do any other operations
if (d->extended)
d->extended->setState(d->state);
@@ -1700,8 +1713,7 @@ bool QPainter::begin(QPaintDevice *pd)
&& !paintOutsidePaintEvent && !inPaintEvent) {
qWarning("QPainter::begin: Widget painting can only begin as a "
"result of a paintEvent");
- d->engine = 0;
- d->device = 0;
+ qt_cleanup_painter_state(d);
return false;
}
@@ -1719,8 +1731,7 @@ bool QPainter::begin(QPaintDevice *pd)
Q_ASSERT(pm);
if (pm->isNull()) {
qWarning("QPainter::begin: Cannot paint on a null pixmap");
- d->engine = 0;
- d->device = 0;
+ qt_cleanup_painter_state(d);
return false;
}
@@ -1736,8 +1747,12 @@ bool QPainter::begin(QPaintDevice *pd)
Q_ASSERT(img);
if (img->isNull()) {
qWarning("QPainter::begin: Cannot paint on a null image");
- d->engine = 0;
- d->device = 0;
+ qt_cleanup_painter_state(d);
+ return false;
+ } else if (img->format() == QImage::Format_Indexed8) {
+ // Painting on indexed8 images is not supported.
+ qWarning("QPainter::begin: Cannot paint on an image with the QImage::Format_Indexed8 format");
+ qt_cleanup_painter_state(d);
return false;
}
if (img->depth() == 1) {
@@ -1760,12 +1775,8 @@ bool QPainter::begin(QPaintDevice *pd)
if (d->engine->isActive()) {
end();
} else {
- d->states.clear();
- delete d->state;
- d->state = 0;
+ qt_cleanup_painter_state(d);
}
- d->engine = 0;
- d->device = 0;
return false;
} else {
d->engine->setActive(begun);
@@ -1828,10 +1839,7 @@ bool QPainter::end()
if (!d->engine) {
qWarning("QPainter::end: Painter not active, aborted");
- d->states.clear();
- delete d->state;
- d->state = 0;
- d->device = 0;
+ qt_cleanup_painter_state(d);
return false;
}
@@ -1862,8 +1870,6 @@ bool QPainter::end()
delete d->engine;
}
- d->engine = 0;
-
if (d->emulationEngine) {
delete d->emulationEngine;
d->emulationEngine = 0;
@@ -1873,11 +1879,8 @@ bool QPainter::end()
d->extended = 0;
}
- d->states.clear();
- delete d->state;
- d->state = 0;
+ qt_cleanup_painter_state(d);
- d->device = 0;
return ended;
}
@@ -2051,8 +2054,7 @@ QPoint QPainter::brushOrigin() const
Sets the brush origin to \a position.
The brush origin specifies the (0, 0) coordinate of the painter's
- brush. This setting only applies to pattern brushes and pixmap
- brushes.
+ brush.
Note that while the brushOrigin() was necessary to adopt the
parent's background for a widget in Qt 3, this is no longer the
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index 66d0c9d..b602690 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -310,7 +310,7 @@ struct QBoolToType
template <typename T>
void qScanConvert(QScanConverter &d, T allVertical)
{
- qSort(d.m_lines.data(), d.m_lines.data() + d.m_lines.size(), topOrder);
+ qSort(d.m_lines.data(), d.m_lines.data() + d.m_lines.size(), QT_PREPEND_NAMESPACE(topOrder));
int line = 0;
for (int y = d.m_lines.first().top; y <= d.m_bottom; ++y) {
for (; line < d.m_lines.size() && d.m_lines.at(line).top == y; ++line) {
@@ -319,7 +319,7 @@ void qScanConvert(QScanConverter &d, T allVertical)
QScanConverter::Line *l = &d.m_lines.at(line);
d.m_active.resize(d.m_active.size() + 1);
int j;
- for (j = d.m_active.size() - 2; j >= 0 && xOrder(l, d.m_active.at(j)); --j)
+ for (j = d.m_active.size() - 2; j >= 0 && QT_PREPEND_NAMESPACE(xOrder)(l, d.m_active.at(j)); --j)
d.m_active.at(j+1) = d.m_active.at(j);
d.m_active.at(j+1) = l;
} else {
@@ -334,7 +334,7 @@ void qScanConvert(QScanConverter &d, T allVertical)
for (int i = 1; i < numActive; ++i) {
QScanConverter::Line *l = d.m_active.at(i);
int j;
- for (j = i-1; j >= 0 && xOrder(l, d.m_active.at(j)); --j)
+ for (j = i-1; j >= 0 && QT_PREPEND_NAMESPACE(xOrder)(l, d.m_active.at(j)); --j)
d.m_active.at(j+1) = d.m_active.at(j);
d.m_active.at(j+1) = l;
}
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index 9063945..c57b3c1 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -969,13 +969,31 @@ QPointF qt_curves_for_arc(const QRectF &rect, qreal startAngle, qreal sweepLengt
}
+static inline void qdashstroker_moveTo(qfixed x, qfixed y, void *data) {
+ ((QStroker *) data)->moveTo(x, y);
+}
+
+static inline void qdashstroker_lineTo(qfixed x, qfixed y, void *data) {
+ ((QStroker *) data)->lineTo(x, y);
+}
+
+static inline void qdashstroker_cubicTo(qfixed, qfixed, qfixed, qfixed, qfixed, qfixed, void *) {
+ Q_ASSERT(0);
+// ((QStroker *) data)->cubicTo(c1x, c1y, c2x, c2y, ex, ey);
+}
+
+
/*******************************************************************************
* QDashStroker members
*/
QDashStroker::QDashStroker(QStroker *stroker)
- : m_stroker(stroker), m_dashOffset(0)
+ : m_stroker(stroker), m_dashOffset(0), m_stroke_width(1), m_miter_limit(1)
{
-
+ if (m_stroker) {
+ setMoveToHook(qdashstroker_moveTo);
+ setLineToHook(qdashstroker_lineTo);
+ setCubicToHook(qdashstroker_cubicTo);
+ }
}
QVector<qfixed> QDashStroker::patternForStyle(Qt::PenStyle style)
@@ -1012,10 +1030,16 @@ void QDashStroker::processCurrentSubpath()
int dashCount = qMin(m_dashPattern.size(), 32);
qfixed dashes[32];
+ if (m_stroker) {
+ m_customData = m_stroker;
+ m_stroke_width = m_stroker->strokeWidth();
+ m_miter_limit = m_stroker->miterLimit();
+ }
+
qreal longestLength = 0;
qreal sumLength = 0;
for (int i=0; i<dashCount; ++i) {
- dashes[i] = qMax(m_dashPattern.at(i), qreal(0)) * m_stroker->strokeWidth();
+ dashes[i] = qMax(m_dashPattern.at(i), qreal(0)) * m_stroke_width;
sumLength += dashes[i];
if (dashes[i] > longestLength)
longestLength = dashes[i];
@@ -1031,7 +1055,7 @@ void QDashStroker::processCurrentSubpath()
int idash = 0; // Index to current dash
qreal pos = 0; // The position on the curve, 0 <= pos <= path.length
qreal elen = 0; // element length
- qreal doffset = m_dashOffset * m_stroker->strokeWidth();
+ qreal doffset = m_dashOffset * m_stroke_width;
// make sure doffset is in range [0..sumLength)
doffset -= qFloor(doffset / sumLength) * sumLength;
@@ -1056,7 +1080,7 @@ void QDashStroker::processCurrentSubpath()
qfixed2d line_to_pos;
// Pad to avoid clipping the borders of thick pens.
- qfixed padding = qt_real_to_fixed(qMax(m_stroker->strokeWidth(), m_stroker->miterLimit()) * longestLength);
+ qfixed padding = qt_real_to_fixed(qMax(m_stroke_width, m_miter_limit) * longestLength);
qfixed2d clip_tl = { qt_real_to_fixed(m_clip_rect.left()) - padding,
qt_real_to_fixed(m_clip_rect.top()) - padding };
qfixed2d clip_br = { qt_real_to_fixed(m_clip_rect.right()) + padding ,
@@ -1108,7 +1132,7 @@ void QDashStroker::processCurrentSubpath()
// continue the current dash, without starting a
// new subpath.
if (!has_offset || !hasMoveTo) {
- m_stroker->moveTo(move_to_pos.x, move_to_pos.y);
+ emitMoveTo(move_to_pos.x, move_to_pos.y);
hasMoveTo = true;
}
@@ -1120,7 +1144,7 @@ void QDashStroker::processCurrentSubpath()
|| (line_to_pos.x > clip_tl.x && line_to_pos.x < clip_br.x
&& line_to_pos.y > clip_tl.y && line_to_pos.y < clip_br.y))
{
- m_stroker->lineTo(line_to_pos.x, line_to_pos.y);
+ emitLineTo(line_to_pos.x, line_to_pos.y);
}
} else {
move_to_pos.x = qt_real_to_fixed(p2.x());
@@ -1134,6 +1158,7 @@ void QDashStroker::processCurrentSubpath()
estart = estop;
prev = e;
}
+
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qstroker_p.h b/src/gui/painting/qstroker_p.h
index d33eeb4..a10ebd9 100644
--- a/src/gui/painting/qstroker_p.h
+++ b/src/gui/painting/qstroker_p.h
@@ -171,7 +171,6 @@ protected:
QRectF m_clip_rect;
-private:
void *m_customData;
qStrokerMoveToHook m_moveTo;
qStrokerLineToHook m_lineTo;
@@ -258,12 +257,18 @@ public:
virtual void begin(void *data);
virtual void end();
+ inline void setStrokeWidth(qreal width) { m_stroke_width = width; }
+ inline void setMiterLimit(qreal limit) { m_miter_limit = limit; }
+
protected:
virtual void processCurrentSubpath();
QStroker *m_stroker;
QVector<qfixed> m_dashPattern;
qreal m_dashOffset;
+
+ qreal m_stroke_width;
+ qreal m_miter_limit;
};
@@ -361,16 +366,16 @@ inline void QStroker::emitCubicTo(qfixed c1x, qfixed c1y,
*/
inline void QDashStroker::begin(void *data)
{
- Q_ASSERT(m_stroker);
- m_stroker->begin(data);
+ if (m_stroker)
+ m_stroker->begin(data);
QStrokerOps::begin(data);
}
inline void QDashStroker::end()
{
- Q_ASSERT(m_stroker);
QStrokerOps::end();
- m_stroker->end();
+ if (m_stroker)
+ m_stroker->end();
}
QT_END_NAMESPACE
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
index 6712bf6..3eef808 100644
--- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
@@ -131,7 +131,6 @@ static const char* const qglslPositionWithPatternBrushVertexShader = "\
gl_Position.xy = gl_Position.xy * invertedHTexCoordsZ; \
gl_Position.w = invertedHTexCoordsZ; \
patternTexCoords.xy = (hTexCoords.xy * 0.125) * invertedHTexCoordsZ; \
- patternTexCoords.y = -patternTexCoords.y; \
}";
static const char* const qglslAffinePositionWithPatternBrushVertexShader
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 8130151..13efbda 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -469,8 +469,6 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
QPointF translationPoint;
if (style <= Qt::DiagCrossPattern) {
- translationPoint = q->state()->brushOrigin;
-
QColor col = qt_premultiplyColor(currentBrush->color(), (GLfloat)q->state()->opacity);
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::PatternColor), col);
@@ -528,8 +526,6 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize);
}
else if (style == Qt::TexturePattern) {
- translationPoint = q->state()->brushOrigin;
-
const QPixmap& texPixmap = currentBrush->texture();
if (qHasPixmapTexture(*currentBrush) && currentBrush->texture().isQBitmap()) {
@@ -546,9 +542,13 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms()
else
qWarning("QGL2PaintEngineEx: Unimplemented fill style");
+ const QPointF &brushOrigin = q->state()->brushOrigin;
+ QTransform matrix = q->state()->matrix;
+ matrix.translate(brushOrigin.x(), brushOrigin.y());
+
QTransform translate(1, 0, 0, 1, -translationPoint.x(), -translationPoint.y());
QTransform gl_to_qt(1, 0, 0, -1, 0, height);
- QTransform inv_matrix = gl_to_qt * (brushQTransform * q->state()->matrix).inverted() * translate;
+ QTransform inv_matrix = gl_to_qt * (brushQTransform * matrix).inverted() * translate;
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::BrushTransform), inv_matrix);
shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::BrushTexture), QT_BRUSH_TEXTURE_UNIT);
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 0d00f59..39f04d4 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1977,6 +1977,32 @@ GLuint QGLContext::bindTexture(const QString &fileName)
return tx_id;
}
+static inline QRgb qt_gl_convertToGLFormatHelper(QRgb src_pixel, GLenum texture_format)
+{
+ if (texture_format == GL_BGRA) {
+ if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
+ return ((src_pixel << 24) & 0xff000000)
+ | ((src_pixel >> 24) & 0x000000ff)
+ | ((src_pixel << 8) & 0x00ff0000)
+ | ((src_pixel >> 8) & 0x0000ff00);
+ } else {
+ return src_pixel;
+ }
+ } else { // GL_RGBA
+ if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
+ return (src_pixel << 8) | ((src_pixel >> 24) & 0xff);
+ } else {
+ return ((src_pixel << 16) & 0xff0000)
+ | ((src_pixel >> 16) & 0xff)
+ | (src_pixel & 0xff00ff00);
+ }
+ }
+}
+
+QRgb qt_gl_convertToGLFormat(QRgb src_pixel, GLenum texture_format)
+{
+ return qt_gl_convertToGLFormatHelper(src_pixel, texture_format);
+}
static void convertToGLFormatHelper(QImage &dst, const QImage &img, GLenum texture_format)
{
@@ -2005,25 +2031,7 @@ static void convertToGLFormatHelper(QImage &dst, const QImage &img, GLenum textu
const uint *src = (const quint32 *) (srcPixels - (srcy >> 16) * sbpl);
int srcx = basex;
for (int x=0; x<target_width; ++x) {
- uint src_pixel = src[srcx >> 16];
- if (texture_format == GL_BGRA) {
- if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
- dest[x] = ((src_pixel << 24) & 0xff000000)
- | ((src_pixel >> 24) & 0x000000ff)
- | ((src_pixel << 8) & 0x00ff0000)
- | ((src_pixel >> 8) & 0x0000ff00);
- } else {
- dest[x] = src_pixel;
- }
- } else { // GL_RGBA
- if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
- dest[x] = (src_pixel << 8) | ((src_pixel >> 24) & 0xff);
- } else {
- dest[x] = ((src_pixel << 16) & 0xff0000)
- | ((src_pixel >> 16) & 0xff)
- | (src_pixel & 0xff00ff00);
- }
- }
+ dest[x] = qt_gl_convertToGLFormatHelper(src[srcx >> 16], texture_format);
srcx += ix;
}
dest = (quint32 *)(((uchar *) dest) + dbpl);
@@ -2351,7 +2359,7 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
#if defined(Q_WS_X11)
// Try to use texture_from_pixmap
- if (pd->classId() == QPixmapData::X11Class) {
+ if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType) {
texture = bindTextureFromNativePixmap(pd, key, options);
if (texture) {
texture->options |= QGLContext::MemoryManagedBindOption;
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index 8fc95cf..7374594 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -331,8 +331,22 @@ void QGLFBOGLPaintDevice::setFBO(QGLFramebufferObject* f,
}
}
+QGLContext *QGLFBOGLPaintDevice::context() const
+{
+ QGLContext *fboContext = const_cast<QGLContext *>(fbo->d_ptr->fbo_guard.context());
+ QGLContext *currentContext = const_cast<QGLContext *>(QGLContext::currentContext());
+
+ if (QGLContextPrivate::contextGroup(fboContext) == QGLContextPrivate::contextGroup(currentContext))
+ return currentContext;
+ else
+ return fboContext;
+}
+
void QGLFBOGLPaintDevice::ensureActiveTarget()
{
+ if (QGLContext::currentContext() != context())
+ context()->makeCurrent();
+
QGLContext* ctx = const_cast<QGLContext*>(QGLContext::currentContext());
Q_ASSERT(ctx);
const GLuint fboId = fbo->d_func()->fbo();
@@ -344,6 +358,9 @@ void QGLFBOGLPaintDevice::ensureActiveTarget()
void QGLFBOGLPaintDevice::beginPaint()
{
+ if (QGLContext::currentContext() != context())
+ context()->makeCurrent();
+
// We let QFBO track the previously bound FBO rather than doing it
// ourselves here. This has the advantage that begin/release & bind/end
// work as expected.
@@ -1189,7 +1206,8 @@ QGLFramebufferObject::Attachment QGLFramebufferObject::attachment() const
bool QGLFramebufferObject::isBound() const
{
Q_D(const QGLFramebufferObject);
- return QGLContext::currentContext()->d_ptr->current_fbo == d->fbo();
+ const QGLContext *current = QGLContext::currentContext();
+ return current ? current->d_ptr->current_fbo == d->fbo() : false;
}
/*!
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index 9fe80b8..122c42e 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -109,7 +109,7 @@ class QGLFBOGLPaintDevice : public QGLPaintDevice
public:
virtual QPaintEngine* paintEngine() const {return fbo->paintEngine();}
virtual QSize size() const {return fbo->size();}
- virtual QGLContext* context() const {return const_cast<QGLContext *>(QGLContext::currentContext());}
+ virtual QGLContext* context() const;
virtual QGLFormat format() const {return fboFormat;}
virtual void ensureActiveTarget();
virtual void beginPaint();
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 1a11476..80628a2 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -1221,7 +1221,7 @@ inline void QOpenGLPaintEnginePrivate::setGradientOps(const QBrush &brush, const
fragment_brush = FRAGMENT_PROGRAM_BRUSH_CONICAL;
else if (current_style == Qt::SolidPattern)
fragment_brush = FRAGMENT_PROGRAM_BRUSH_SOLID;
- else if (current_style == Qt::TexturePattern)
+ else if (current_style == Qt::TexturePattern && !brush.texture().isQBitmap())
fragment_brush = FRAGMENT_PROGRAM_BRUSH_TEXTURE;
else
fragment_brush = FRAGMENT_PROGRAM_BRUSH_PATTERN;
@@ -1595,7 +1595,8 @@ void QOpenGLPaintEnginePrivate::updateGradient(const QBrush &brush, const QRectF
qreal realRadius = g->radius();
QTransform translate(1, 0, 0, 1, -realFocal.x(), -realFocal.y());
QTransform gl_to_qt(1, 0, 0, -1, 0, pdev->height());
- QTransform inv_matrix = gl_to_qt * matrix.inverted() * brush.transform().inverted() * translate;
+ QTransform m = QTransform(matrix).translate(brush_origin.x(), brush_origin.y());
+ QTransform inv_matrix = gl_to_qt * (brush.transform() * m).inverted() * translate;
setInvMatrixData(inv_matrix);
@@ -1608,7 +1609,8 @@ void QOpenGLPaintEnginePrivate::updateGradient(const QBrush &brush, const QRectF
QPointF realCenter = g->center();
QTransform translate(1, 0, 0, 1, -realCenter.x(), -realCenter.y());
QTransform gl_to_qt(1, 0, 0, -1, 0, pdev->height());
- QTransform inv_matrix = gl_to_qt * matrix.inverted() * brush.transform().inverted() * translate;
+ QTransform m = QTransform(matrix).translate(brush_origin.x(), brush_origin.y());
+ QTransform inv_matrix = gl_to_qt * (brush.transform() * m).inverted() * translate;
setInvMatrixData(inv_matrix);
@@ -1620,8 +1622,8 @@ void QOpenGLPaintEnginePrivate::updateGradient(const QBrush &brush, const QRectF
QPointF realFinal = g->finalStop();
QTransform translate(1, 0, 0, 1, -realStart.x(), -realStart.y());
QTransform gl_to_qt(1, 0, 0, -1, 0, pdev->height());
-
- QTransform inv_matrix = gl_to_qt * matrix.inverted() * brush.transform().inverted() * translate;
+ QTransform m = QTransform(matrix).translate(brush_origin.x(), brush_origin.y());
+ QTransform inv_matrix = gl_to_qt * (brush.transform() * m).inverted() * translate;
setInvMatrixData(inv_matrix);
@@ -1632,10 +1634,9 @@ void QOpenGLPaintEnginePrivate::updateGradient(const QBrush &brush, const QRectF
linear_data[2] = 1.0f / (l.x() * l.x() + l.y() * l.y());
} else if (style != Qt::SolidPattern) {
- QTransform translate(1, 0, 0, 1, brush_origin.x(), brush_origin.y());
QTransform gl_to_qt(1, 0, 0, -1, 0, pdev->height());
-
- QTransform inv_matrix = gl_to_qt * matrix.inverted() * brush.transform().inverted() * translate;
+ QTransform m = QTransform(matrix).translate(brush_origin.x(), brush_origin.y());
+ QTransform inv_matrix = gl_to_qt * (brush.transform() * m).inverted();
setInvMatrixData(inv_matrix);
}
@@ -4309,6 +4310,16 @@ void QOpenGLPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QR
void QOpenGLPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &offset)
{
Q_D(QOpenGLPaintEngine);
+ if (pm.depth() == 1) {
+ QPixmap tpx(pm.size());
+ tpx.fill(Qt::transparent);
+ QPainter p(&tpx);
+ p.setPen(d->cpen);
+ p.drawPixmap(0, 0, pm);
+ p.end();
+ drawTiledPixmap(r, tpx, offset);
+ return;
+ }
QImage scaled;
const int sz = d->max_texture_size;
@@ -5205,7 +5216,7 @@ void QOpenGLPaintEnginePrivate::composite(GLuint primitive, const q_vertexType *
device->context()->d_func()->bindTexture(cbrush.textureImage(), GL_TEXTURE_2D, GL_RGBA,
QGLContext::InternalBindOption);
else
- device->context()->d_func()->bindTexture(qt_imageForBrush(current_style, true),
+ device->context()->d_func()->bindTexture(qt_imageForBrush(current_style, false),
GL_TEXTURE_2D, GL_RGBA,
QGLContext::InternalBindOption);
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index cbb310b..83ebece 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -240,6 +240,11 @@ QGLPixmapData::~QGLPixmapData()
}
}
+QPixmapData *QGLPixmapData::createCompatiblePixmapData() const
+{
+ return new QGLPixmapData(pixelType());
+}
+
bool QGLPixmapData::isValid() const
{
return w > 0 && h > 0;
@@ -421,6 +426,10 @@ QImage QGLPixmapData::fillImage(const QColor &color) const
if (pixelType() == BitmapType) {
img = QImage(w, h, QImage::Format_MonoLSB);
+ img.setNumColors(2);
+ img.setColor(0, QColor(Qt::color0).rgba());
+ img.setColor(1, QColor(Qt::color1).rgba());
+
if (color == Qt::color1)
img.fill(1);
else
@@ -559,6 +568,7 @@ QPaintEngine* QGLPixmapData::paintEngine() const
return m_source.paintEngine();
}
+extern QRgb qt_gl_convertToGLFormat(QRgb src_pixel, GLenum texture_format);
// If copyBack is true, bind will copy the contents of the render
// FBO to the texture (which is not bound to the texture, as it's
@@ -568,17 +578,26 @@ GLuint QGLPixmapData::bind(bool copyBack) const
if (m_renderFbo && copyBack) {
copyBackFromRenderFbo(true);
} else {
- if (m_hasFillColor) {
- m_dirty = true;
- m_source = QImage(w, h, QImage::Format_ARGB32_Premultiplied);
- m_source.fill(PREMUL(m_fillColor.rgba()));
- m_hasFillColor = false;
- }
ensureCreated();
}
GLuint id = m_texture.id;
glBindTexture(GL_TEXTURE_2D, id);
+
+ if (m_hasFillColor) {
+ if (!useFramebufferObjects()) {
+ m_source = QImage(w, h, QImage::Format_ARGB32_Premultiplied);
+ m_source.fill(PREMUL(m_fillColor.rgba()));
+ }
+
+ m_hasFillColor = false;
+
+ GLenum format = qt_gl_preferredTextureFormat();
+ QImage tx(w, h, QImage::Format_ARGB32_Premultiplied);
+ tx.fill(qt_gl_convertToGLFormat(m_fillColor.rgba(), format));
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, format, GL_UNSIGNED_BYTE, tx.bits());
+ }
+
return id;
}
diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h
index f67a7c2..6190d38 100644
--- a/src/opengl/qpixmapdata_gl_p.h
+++ b/src/opengl/qpixmapdata_gl_p.h
@@ -101,6 +101,8 @@ public:
QGLPixmapData(PixelType type);
~QGLPixmapData();
+ QPixmapData *createCompatiblePixmapData() const;
+
// Re-implemented from QPixmapData:
void resize(int width, int height);
void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index df84a76..2816eca 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -418,6 +418,12 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
return;
}
+ //### Find out why d_ptr->geometry_updated isn't always false.
+ // flush() should not be called when d_ptr->geometry_updated is true. It assumes that either
+ // d_ptr->fbo or d_ptr->pb is allocated and has the correct size.
+ if (d_ptr->geometry_updated)
+ return;
+
QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget();
Q_ASSERT(parent);
diff --git a/src/opengl/util/composition_mode_colorburn.glsl b/src/opengl/util/composition_mode_colorburn.glsl
index a5a153f..c913b97 100644
--- a/src/opengl/util/composition_mode_colorburn.glsl
+++ b/src/opengl/util/composition_mode_colorburn.glsl
@@ -5,8 +5,8 @@
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
- result.rgb = mix(src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a),
- src.a * (src.rgb * dst.a + dst.rgb * src.a - src.a * dst.a) / max(src.rgb, 0.00001) + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a),
+ result.rgb = mix(src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a),
+ src.a * (src.rgb * dst.a + dst.rgb * src.a - src.a * dst.a) / max(src.rgb, 0.00001) + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a),
step(src.a * dst.a, src.rgb * dst.a + dst.rgb * src.a));
result.a = src.a + dst.a - src.a * dst.a;
return result;
diff --git a/src/opengl/util/composition_mode_colordodge.glsl b/src/opengl/util/composition_mode_colordodge.glsl
index c194441..b75e83c 100644
--- a/src/opengl/util/composition_mode_colordodge.glsl
+++ b/src/opengl/util/composition_mode_colordodge.glsl
@@ -5,8 +5,8 @@
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
- vec3 temp = src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a);
- result.rgb = mix(dst.rgb * src.a / max(1 - src.rgb / max(src.a, 0.000001), 0.000001) + temp,
+ vec3 temp = src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a);
+ result.rgb = mix(dst.rgb * src.a / max(1.0 - src.rgb / max(src.a, 0.000001), 0.000001) + temp,
src.a * dst.a + temp,
step(src.a * dst.a, src.rgb * dst.a + dst.rgb * src.a));
diff --git a/src/opengl/util/composition_mode_darken.glsl b/src/opengl/util/composition_mode_darken.glsl
index c1e83fd..8bbb82b 100644
--- a/src/opengl/util/composition_mode_darken.glsl
+++ b/src/opengl/util/composition_mode_darken.glsl
@@ -3,7 +3,7 @@
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
- result.rgb = min(src.rgb * dst.a, dst.rgb * src.a) + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a);
+ result.rgb = min(src.rgb * dst.a, dst.rgb * src.a) + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a);
result.a = src.a + dst.a - src.a * dst.a;
return result;
}
diff --git a/src/opengl/util/composition_mode_difference.glsl b/src/opengl/util/composition_mode_difference.glsl
index ca13ce7..3c46ec7 100644
--- a/src/opengl/util/composition_mode_difference.glsl
+++ b/src/opengl/util/composition_mode_difference.glsl
@@ -3,7 +3,7 @@
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
- result.rgb = src.rgb + dst.rgb - 2 * min(src.rgb * dst.a, dst.rgb * src.a);
+ result.rgb = src.rgb + dst.rgb - 2.0 * min(src.rgb * dst.a, dst.rgb * src.a);
result.a = src.a + dst.a - src.a * dst.a;
return result;
}
diff --git a/src/opengl/util/composition_mode_exclusion.glsl b/src/opengl/util/composition_mode_exclusion.glsl
index ccd1183..59c2da9 100644
--- a/src/opengl/util/composition_mode_exclusion.glsl
+++ b/src/opengl/util/composition_mode_exclusion.glsl
@@ -3,7 +3,7 @@
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
- result.rgb = (src.rgb * dst.a + dst.rgb * src.a - 2 * src.rgb * dst.rgb) + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a);
+ result.rgb = (src.rgb * dst.a + dst.rgb * src.a - 2.0 * src.rgb * dst.rgb) + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a);
result.a = src.a + dst.a - src.a * dst.a;
return result;
}
diff --git a/src/opengl/util/composition_mode_hardlight.glsl b/src/opengl/util/composition_mode_hardlight.glsl
index 9dd4de3..4ea3550 100644
--- a/src/opengl/util/composition_mode_hardlight.glsl
+++ b/src/opengl/util/composition_mode_hardlight.glsl
@@ -5,9 +5,9 @@
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
- result.rgb = mix(2 * src.rgb * dst.rgb + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a),
- src.a * dst.a - 2 * (dst.a - dst.rgb) * (src.a - src.rgb) + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a),
- step(src.a, 2 * src.rgb));
+ result.rgb = mix(2.0 * src.rgb * dst.rgb + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a),
+ src.a * dst.a - 2.0 * (dst.a - dst.rgb) * (src.a - src.rgb) + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a),
+ step(src.a, 2.0 * src.rgb));
result.a = src.a + dst.a - src.a * dst.a;
return result;
diff --git a/src/opengl/util/composition_mode_lighten.glsl b/src/opengl/util/composition_mode_lighten.glsl
index 1fbd27a..13ef507 100644
--- a/src/opengl/util/composition_mode_lighten.glsl
+++ b/src/opengl/util/composition_mode_lighten.glsl
@@ -3,7 +3,7 @@
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
- result.rgb = max(src.rgb * dst.a, dst.rgb * src.a) + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a);
+ result.rgb = max(src.rgb * dst.a, dst.rgb * src.a) + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a);
result.a = src.a + dst.a - src.a * dst.a;
return result;
}
diff --git a/src/opengl/util/composition_mode_multiply.glsl b/src/opengl/util/composition_mode_multiply.glsl
index 268345a..f90b7f0 100644
--- a/src/opengl/util/composition_mode_multiply.glsl
+++ b/src/opengl/util/composition_mode_multiply.glsl
@@ -3,7 +3,7 @@
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
- result.rgb = src.rgb * dst.rgb + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a);
+ result.rgb = src.rgb * dst.rgb + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a);
result.a = src.a + dst.a - src.a * dst.a;
return result;
}
diff --git a/src/opengl/util/composition_mode_overlay.glsl b/src/opengl/util/composition_mode_overlay.glsl
index a9b7226..f621bde 100644
--- a/src/opengl/util/composition_mode_overlay.glsl
+++ b/src/opengl/util/composition_mode_overlay.glsl
@@ -5,9 +5,9 @@
vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
- result.rgb = mix(2 * src.rgb * dst.rgb + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a),
- src.a * dst.a - 2 * (dst.a - dst.rgb) * (src.a - src.rgb) + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a),
- step(dst.a, 2 * dst.rgb));
+ result.rgb = mix(2.0 * src.rgb * dst.rgb + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a),
+ src.a * dst.a - 2.0 * (dst.a - dst.rgb) * (src.a - src.rgb) + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a),
+ step(dst.a, 2.0 * dst.rgb));
result.a = src.a + dst.a - src.a * dst.a;
return result;
}
diff --git a/src/opengl/util/composition_mode_softlight.glsl b/src/opengl/util/composition_mode_softlight.glsl
index 0237827..4777b74 100644
--- a/src/opengl/util/composition_mode_softlight.glsl
+++ b/src/opengl/util/composition_mode_softlight.glsl
@@ -8,11 +8,11 @@ vec4 composite(vec4 src, vec4 dst)
{
vec4 result;
float da = max(dst.a, 0.00001);
- result.rgb = mix(dst.rgb * (src.a - (1 - dst.rgb / da) * (2 * src.rgb - src.a)),
- mix(dst.rgb * (src.a - (1 - dst.rgb / da) * (2 * src.rgb - src.a) * (3 - 8 * dst.rgb / da)),
- (dst.rgb * src.a + (sqrt(dst.rgb / da) * dst.a - dst.rgb) * (2 * src.rgb - src.a)),
- step(dst.a, 8 * dst.rgb)),
- step(src.a, 2 * src.rgb)) + src.rgb * (1 - dst.a) + dst.rgb * (1 - src.a);
+ result.rgb = mix(dst.rgb * (src.a - (1.0 - dst.rgb / da) * (2.0 * src.rgb - src.a)),
+ mix(dst.rgb * (src.a - (1.0 - dst.rgb / da) * (2.0 * src.rgb - src.a) * (3.0 - 8.0 * dst.rgb / da)),
+ (dst.rgb * src.a + (sqrt(dst.rgb / da) * dst.a - dst.rgb) * (2.0 * src.rgb - src.a)),
+ step(dst.a, 8.0 * dst.rgb)),
+ step(src.a, 2.0 * src.rgb)) + src.rgb * (1.0 - dst.a) + dst.rgb * (1.0 - src.a);
result.a = src.a + dst.a - src.a * dst.a;
return result;
}
diff --git a/src/opengl/util/conical_brush.glsl b/src/opengl/util/conical_brush.glsl
index 83ee2f5..b3ec1d7 100644
--- a/src/opengl/util/conical_brush.glsl
+++ b/src/opengl/util/conical_brush.glsl
@@ -20,7 +20,7 @@ vec4 brush()
/* float val = fmod((atan2(-A.y, A.x) + angle) / (2.0 * M_PI), 1); */
if (abs(A.y) == abs(A.x))
A.y += 0.002;
- float t = (atan2(-A.y, A.x) + angle) / (2.0 * M_PI);
+ float t = (atan(-A.y, A.x) + angle) / (2.0 * M_PI);
float val = t - floor(t);
return texture1D(palette, val);
}
diff --git a/src/opengl/util/ellipse.glsl b/src/opengl/util/ellipse.glsl
deleted file mode 100644
index 860ae77..0000000
--- a/src/opengl/util/ellipse.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "ellipse_functions.glsl"
-
-void main()
-{
- gl_FragColor = ellipse();
-}
diff --git a/src/opengl/util/ellipse_aa.glsl b/src/opengl/util/ellipse_aa.glsl
index f7a6454..257e3bb 100644
--- a/src/opengl/util/ellipse_aa.glsl
+++ b/src/opengl/util/ellipse_aa.glsl
@@ -1,6 +1,58 @@
-#include "ellipse_functions.glsl"
+uniform vec3 inv_matrix_m0;
+uniform vec3 inv_matrix_m1;
+uniform vec3 inv_matrix_m2;
+
+uniform vec2 ellipse_offset;
+
+// ellipse equation
+
+// s^2/a^2 + t^2/b^2 = 1
+//
+// implicit equation:
+// g(s,t) = 1 - s^2/r_s^2 - t^2/r_t^2
+
+// distance from ellipse:
+// grad = [dg/dx dg/dy]
+// d(s, t) ~= g(s, t) / |grad|
+
+// dg/dx = dg/ds * ds/dx + dg/dt * dt/dx
+// dg/dy = dg/ds * ds/dy + dg/dt * dt/dy
+
+float ellipse_aa()
+{
+ mat3 mat;
+
+ mat[0] = inv_matrix_m0;
+ mat[1] = inv_matrix_m1;
+ mat[2] = inv_matrix_m2;
+
+ vec3 hcoords = mat * vec3(gl_FragCoord.xy + ellipse_offset, 1);
+ float inv_w = 1.0 / hcoords.z;
+ vec2 st = hcoords.xy * inv_w;
+
+ vec4 xy = vec4(mat[0].xy, mat[1].xy);
+ vec2 h = vec2(mat[0].z, mat[1].z);
+
+ vec4 dstdxy = (xy.xzyw - h.xyxy * st.xxyy) * inv_w;
+
+ //dstdxy.x = (mat[0].x - mat[0].z * st.x) * inv_w; // ds/dx
+ //dstdxy.y = (mat[1].x - mat[1].z * st.x) * inv_w; // ds/dy
+ //dstdxy.z = (mat[0].y - mat[0].z * st.y) * inv_w; // dt/dx
+ //dstdxy.w = (mat[1].y - mat[1].z * st.y) * inv_w; // dt/dy
+
+ vec2 inv_r = gl_TexCoord[0].xy;
+ vec2 n = st * inv_r;
+ float g = 1.0 - dot(n, n);
+
+ vec2 dgdst = -2.0 * n * inv_r;
+
+ vec2 grad = vec2(dot(dgdst, dstdxy.xz),
+ dot(dgdst, dstdxy.yw));
+
+ return smoothstep(-0.5, 0.5, g * inversesqrt(dot(grad, grad)));
+}
void main()
{
- gl_FragColor = ellipse_aa();
+ gl_FragColor = ellipse_aa().xxxx;
}
diff --git a/src/opengl/util/ellipse_aa_copy.glsl b/src/opengl/util/ellipse_aa_copy.glsl
deleted file mode 100644
index 5372f58..0000000
--- a/src/opengl/util/ellipse_aa_copy.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-uniform vec2 r; // r_x and r_y
-
-uniform sampler2D texture;
-uniform vec2 inv_texture_size;
-
-#include "ellipse_functions.glsl"
-
-void main()
-{
- gl_FragColor = ellipse_aa() * texture2D(texture, gl_FragCoord.xy * inv_texture_size);
-}
diff --git a/src/opengl/util/ellipse_aa_radial.glsl b/src/opengl/util/ellipse_aa_radial.glsl
deleted file mode 100644
index 0878f99..0000000
--- a/src/opengl/util/ellipse_aa_radial.glsl
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "ellipse_functions.glsl"
-
-uniform sampler1D palette;
-uniform vec2 fmp;
-uniform float fmp2_m_radius2;
-uniform vec4 inv_matrix;
-uniform vec2 inv_matrix_offset;
-
-void main()
-{
- // float2 A = frag_coord.xy;//mul(inv_matrix, frag_coord.xy) + inv_matrix_offset;
- mat2 mat;
- mat[0][0] = inv_matrix.x;
- mat[0][1] = inv_matrix.y;
- mat[1][0] = inv_matrix.z;
- mat[1][1] = inv_matrix.w;
- vec2 A = gl_FragCoord.xy * mat + inv_matrix_offset;
- vec2 B = fmp;
- float a = fmp2_m_radius2;
- float b = 2.0*dot(A, B);
- float c = -dot(A, A);
- float val = (-b + sqrt(b*b - 4.0*a*c)) / (2.0*a);
- gl_FragColor = texture1D(palette, val) * ellipse_aa();
-}
diff --git a/src/opengl/util/ellipse_functions.glsl b/src/opengl/util/ellipse_functions.glsl
deleted file mode 100644
index eed18e8..0000000
--- a/src/opengl/util/ellipse_functions.glsl
+++ /dev/null
@@ -1,63 +0,0 @@
-uniform vec3 inv_matrix_m0;
-uniform vec3 inv_matrix_m1;
-uniform vec3 inv_matrix_m2;
-
-uniform vec2 ellipse_offset;
-
-float ellipse()
-{
- vec2 st = gl_TexCoord[0].st;
-
- if (dot(st, st) > 1)
- discard;
-
- return 1.0;
-}
-
-// ellipse equation
-
-// s^2/a^2 + t^2/b^2 = 1
-//
-// implicit equation:
-// g(s,t) = 1 - s^2/r_s^2 - t^2/r_t^2
-
-// distance from ellipse:
-// grad = [dg/dx dg/dy]
-// d(s, t) ~= g(s, t) / |grad|
-
-// dg/dx = dg/ds * ds/dx + dg/dt * dt/dx
-// dg/dy = dg/ds * ds/dy + dg/dt * dt/dy
-
-float ellipse_aa()
-{
- mat3 mat;
-
- mat[0] = inv_matrix_m0;
- mat[1] = inv_matrix_m1;
- mat[2] = inv_matrix_m2;
-
- vec3 hcoords = mat * vec3(gl_FragCoord.xy + ellipse_offset, 1);
- float inv_w = 1.0 / hcoords.z;
- vec2 st = hcoords.xy * inv_w;
-
- vec4 xy = vec4(mat[0].xy, mat[1].xy);
- vec2 h = vec2(mat[0].z, mat[1].z);
-
- vec4 dstdxy = (xy.xzyw - h.xyxy * st.xxyy) * inv_w;
-
- //dstdxy.x = (mat[0].x - mat[0].z * st.x) * inv_w; // ds/dx
- //dstdxy.y = (mat[1].x - mat[1].z * st.x) * inv_w; // ds/dy
- //dstdxy.z = (mat[0].y - mat[0].z * st.y) * inv_w; // dt/dx
- //dstdxy.w = (mat[1].y - mat[1].z * st.y) * inv_w; // dt/dy
-
- vec2 inv_r = gl_TexCoord[0].xy;
- vec2 n = st * inv_r;
- float g = 1.0 - dot(n, n);
-
- vec2 dgdst = -2.0 * n * inv_r;
-
- vec2 grad = vec2(dot(dgdst, dstdxy.xz),
- dot(dgdst, dstdxy.yw));
-
- return smoothstep(-0.5, 0.5, g * inversesqrt(dot(grad, grad)));
-}
diff --git a/src/opengl/util/fragmentprograms_p.h b/src/opengl/util/fragmentprograms_p.h
index 340023c..9154c6e 100644
--- a/src/opengl/util/fragmentprograms_p.h
+++ b/src/opengl/util/fragmentprograms_p.h
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
#ifndef FRAGMENTPROGRAMS_P_H
#define FRAGMENTPROGRAMS_P_H
@@ -131,58 +132,57 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_MASK_TRAPEZOID_AA =
"TEMP R2;\n"
"TEMP R3;\n"
"TEMP R4;\n"
- "ADD R4.x, fragment.position, c[0];\n"
+ "ADD R3.z, fragment.position.x, c[0].x;\n"
"ADD R0.y, fragment.position, -c[0].x;\n"
- "MAX R3.w, fragment.texcoord[0].y, R0.y;\n"
+ "MAX R4.x, fragment.texcoord[0].y, R0.y;\n"
"ADD R0.x, fragment.position.y, c[0];\n"
- "MIN R3.z, R0.x, fragment.texcoord[0].x;\n"
+ "MIN R3.w, R0.x, fragment.texcoord[0].x;\n"
"ADD R2.z, fragment.position.x, -c[0].x;\n"
- "MOV R0.yw, R3.w;\n"
- "MOV R0.xz, R3.z;\n"
- "MAD R1, fragment.texcoord[1].xxzz, R0, fragment.texcoord[1].yyww;\n"
- "MAD R1.zw, fragment.position.x, c[0].y, -R1;\n"
- "MOV R0.z, R1.x;\n"
- "MOV R0.w, R1.z;\n"
- "MOV R0.y, R1.w;\n"
- "MOV R0.x, R1.y;\n"
- "MIN R2.xy, R0.zwzw, R0;\n"
- "SGE R1.xy, R0, R0.zwzw;\n"
- "ADD R1.zw, -fragment.texcoord[0], -fragment.texcoord[0];\n"
- "MAX R0.xy, R0.zwzw, R0;\n"
- "MAD R3.xy, R1, R1.zwzw, fragment.texcoord[0].zwzw;\n"
- "MOV R2.w, R4.x;\n"
- "ADD R1, -R2.xxyy, R2.zwzw;\n"
- "MAD R1, R1, R3.xxyy, R3.w;\n"
- "ADD R3.xy, R1.ywzw, R1.xzzw;\n"
- "ADD R4.zw, R3.z, -R1.xyxz;\n"
- "ADD R1.zw, -R3.w, R1.xyyw;\n"
- "ADD R1.xy, R4.x, -R2;\n"
- "MUL R1.xy, R1, R1.zwzw;\n"
- "MAD R3.xy, -R3, c[0].x, R3.z;\n"
- "ADD R2.w, R4.x, -R2.z;\n"
- "MUL R0.zw, R3.xyxy, R2.w;\n"
- "ADD R2.w, R3.z, -R3;\n"
- "ADD R3.xy, -R2.z, R0;\n"
+ "MOV R2.w, R3.z;\n"
+ "MOV R0.yw, R4.x;\n"
+ "MOV R0.xz, R3.w;\n"
+ "MAD R0, fragment.texcoord[1].xxzz, R0, fragment.texcoord[1].yyww;\n"
+ "MAD R0.zw, fragment.position.x, c[0].y, -R0;\n"
+ "MOV R2.x, R0;\n"
+ "MOV R2.y, R0.z;\n"
+ "MOV R1.w, R0;\n"
+ "MOV R1.z, R0.y;\n"
+ "MIN R1.xy, R2, R1.zwzw;\n"
+ "SGE R0.xy, R1.zwzw, R2;\n"
+ "ADD R0.zw, -fragment.texcoord[0], -fragment.texcoord[0];\n"
+ "MAD R3.xy, R0, R0.zwzw, fragment.texcoord[0].zwzw;\n"
+ "ADD R0, -R1.xxyy, R2.zwzw;\n"
+ "MAD R0, R0, R3.xxyy, R4.x;\n"
+ "ADD R3.xy, R0.ywzw, R0.xzzw;\n"
+ "ADD R4.zw, R3.w, -R0.xyxz;\n"
+ "ADD R0.zw, -R4.x, R0.xyyw;\n"
+ "ADD R0.xy, R3.z, -R1;\n"
+ "MAX R1.zw, R2.xyxy, R1;\n"
+ "MUL R0.xy, R0, R0.zwzw;\n"
+ "MAD R3.xy, -R3, c[0].x, R3.w;\n"
+ "ADD R2.w, R3.z, -R2.z;\n"
+ "MUL R2.xy, R3, R2.w;\n"
+ "ADD R2.w, R3, -R4.x;\n"
+ "ADD R3.xy, -R2.z, R1.zwzw;\n"
"MUL R3.xy, R4.zwzw, R3;\n"
- "ADD R4.zw, R2.xyxy, R0.xyxy;\n"
- "MAD R1.zw, R4, c[0].x, -R2.z;\n"
- "MAD R1.xy, -R1, c[0].x, R2.w;\n"
- "MAD R4.zw, R2.w, R1, -R1.xyxy;\n"
- "SGE R1.zw, R4.x, R0.xyxy;\n"
- "MAD R3.xy, R3, c[0].x, -R0.zwzw;\n"
- "MAD R1.xy, R1.zwzw, R4.zwzw, R1;\n"
- "MAD R0.zw, R1, R3.xyxy, R0;\n"
- "ADD R1.zw, R0, -R1.xyxy;\n"
- "SGE R0.zw, R2.z, R2.xyxy;\n"
- "MAD R0.zw, R0, R1, R1.xyxy;\n"
- "ADD R0.zw, -R2.w, R0;\n"
- "SGE R1.xy, R4.x, R2;\n"
- "MAD R0.zw, R1.xyxy, R0, R2.w;\n"
- "SGE R0.xy, R0, R2.z;\n"
- "MUL R0.xy, R0.zwzw, R0;\n"
- "ADD R0.x, R2.w, -R0;\n"
- "SGE R0.z, R3, R3.w;\n"
- "ADD R0.x, R0, -R0.y;\n"
+ "ADD R4.zw, R1.xyxy, R1;\n"
+ "MAD R0.zw, R4, c[0].x, -R2.z;\n"
+ "MAD R0.xy, -R0, c[0].x, R2.w;\n"
+ "MAD R4.zw, R0, R2.w, -R0.xyxy;\n"
+ "SGE R0.zw, R3.z, R1;\n"
+ "MAD R0.xy, R0.zwzw, R4.zwzw, R0;\n"
+ "MAD R3.xy, R3, c[0].x, -R2;\n"
+ "MAD R0.zw, R0, R3.xyxy, R2.xyxy;\n"
+ "ADD R2.xy, R0.zwzw, -R0;\n"
+ "SGE R0.zw, R2.z, R1.xyxy;\n"
+ "MAD R0.xy, R0.zwzw, R2, R0;\n"
+ "SGE R0.zw, R1, R2.z;\n"
+ "ADD R0.xy, R0, -R2.w;\n"
+ "SGE R1.xy, R3.z, R1;\n"
+ "MAD R0.xy, R1, R0, R2.w;\n"
+ "MAD R0.x, -R0, R0.z, R2.w;\n"
+ "SGE R0.z, R3.w, R4.x;\n"
+ "MAD R0.x, -R0.y, R0.w, R0;\n"
"MUL result.color, R0.x, R0.z;\n"
"END\n"
;
@@ -200,27 +200,27 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_MASK_ELLIPSE_AA =
"MAD R0.xyz, R0.x, c[0], R1;\n"
"ADD R0.xyz, R0, c[2];\n"
"RCP R2.z, R0.z;\n"
- "MUL R1.zw, R0.xyxy, R2.z;\n"
- "MUL R2.xy, R1.zwzw, fragment.texcoord[0];\n"
- "MOV R1.x, c[0].z;\n"
- "MOV R1.y, c[1].z;\n"
- "MOV R0.xy, c[0];\n"
- "MOV R0.zw, c[1].xyxy;\n"
- "MAD R0, R1.zzww, -R1.xyxy, R0.xzyw;\n"
+ "MUL R0.zw, R0.xyxy, R2.z;\n"
+ "MUL R2.xy, R0.zwzw, fragment.texcoord[0];\n"
+ "MOV R1.xy, c[0];\n"
+ "MOV R1.zw, c[1].xyxy;\n"
+ "MOV R0.x, c[0].z;\n"
+ "MOV R0.y, c[1].z;\n"
+ "MAD R0, R0.zzww, -R0.xyxy, R1.xzyw;\n"
"MUL R1.xy, R2, fragment.texcoord[0];\n"
"MUL R0, R2.z, R0;\n"
"MUL R1.xy, R1, c[4].x;\n"
"MUL R1.zw, R1.xyxy, R0.xyxz;\n"
- "MUL R0.xy, R1, R0.ywzw;\n"
- "ADD R0.w, R0.x, R0.y;\n"
- "MUL R0.xy, R2, R2;\n"
- "ADD R0.x, R0, R0.y;\n"
- "ADD R0.z, R1, R1.w;\n"
- "MUL R0.zw, R0, R0;\n"
+ "MUL R0.zw, R1.xyxy, R0.xyyw;\n"
"ADD R0.y, R0.z, R0.w;\n"
- "RSQ R0.y, R0.y;\n"
- "ADD R0.x, -R0, c[4].y;\n"
- "MAD_SAT R0.x, R0.y, R0, -c[4].z;\n"
+ "ADD R0.x, R1.z, R1.w;\n"
+ "MUL R0.xy, R0, R0;\n"
+ "ADD R0.x, R0, R0.y;\n"
+ "MUL R0.zw, R2.xyxy, R2.xyxy;\n"
+ "ADD R0.z, R0, R0.w;\n"
+ "ADD R0.y, -R0.z, c[4];\n"
+ "RSQ R0.x, R0.x;\n"
+ "MAD_SAT R0.x, R0, R0.y, -c[4].z;\n"
"MUL R0.y, -R0.x, c[4].w;\n"
"ADD R0.y, R0, c[5].x;\n"
"MUL R0.x, R0, R0;\n"
@@ -407,13 +407,13 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R3;\n"
"MUL R0.xy, fragment.position, c[1];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "ADD R1.y, -fragment.color.primary.w, c[4].x;\n"
- "MAX R1.x, fragment.color.primary.w, c[4].y;\n"
- "MUL R2.xyz, R0, R1.y;\n"
+ "ADD R1.x, -fragment.color.primary.w, c[4];\n"
+ "MAX R1.y, fragment.color.primary.w, c[4];\n"
+ "MUL R2.xyz, R0, R1.x;\n"
"ADD R1.w, -R0, c[4].x;\n"
"MAD R3.xyz, fragment.color.primary, R1.w, R2;\n"
- "RCP R1.x, R1.x;\n"
- "MAD R1.xyz, -fragment.color.primary, R1.x, c[4].x;\n"
+ "RCP R1.y, R1.y;\n"
+ "MAD R1.xyz, -fragment.color.primary, R1.y, c[4].x;\n"
"MAX R1.xyz, R1, c[4].y;\n"
"MUL R2.xyz, fragment.color.primary.w, R0;\n"
"MUL R1.w, fragment.color.primary, R0;\n"
@@ -519,8 +519,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..3],\n"
- " { 1, 9.9999997e-006, 2, 3 },\n"
- " { 8 } };\n"
+ " { 1, 2, 9.9999997e-006, 8 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -529,39 +529,39 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R5;\n"
"MUL R0.xy, fragment.position, c[1];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MAX R1.x, R0.w, c[4].y;\n"
+ "MAX R1.x, R0.w, c[4].z;\n"
"RCP R1.w, R1.x;\n"
- "MUL R2.xyz, R0, R1.w;\n"
- "MUL R1.xyz, -R2, c[5].x;\n"
- "RSQ R2.w, R2.x;\n"
- "ADD R4.xyz, R1, c[4].w;\n"
+ "MUL R1.xyz, R0, R1.w;\n"
+ "MUL R4.xyz, -R1, c[4].w;\n"
+ "RSQ R2.x, R1.x;\n"
+ "RSQ R2.z, R1.z;\n"
+ "RSQ R2.y, R1.y;\n"
"MAD R1.xyz, -R0, R1.w, c[4].x;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "RCP R2.x, R2.w;\n"
+ "RCP R2.x, R2.x;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R5.xyz, R0.w, R2, -R0;\n"
- "MAD R2.xyz, fragment.color.primary, c[4].z, -fragment.color.primary.w;\n"
- "MUL R3.xyz, R1, R2;\n"
- "MAD R3.xyz, -R3, R4, fragment.color.primary.w;\n"
- "MUL R4.xyz, R5, R2;\n"
+ "MAD R3.xyz, R0.w, R2, -R0;\n"
+ "MAD R2.xyz, fragment.color.primary, c[4].y, -fragment.color.primary.w;\n"
+ "MUL R3.xyz, R2, R3;\n"
+ "ADD R5.xyz, R4, c[5].x;\n"
+ "MUL R4.xyz, R1, R2;\n"
"MAD R1.xyz, -R1, R2, fragment.color.primary.w;\n"
- "MUL R3.xyz, R0, R3;\n"
- "MAD R4.xyz, fragment.color.primary.w, R0, R4;\n"
- "ADD R5.xyz, R4, -R3;\n"
- "MUL R4.xyz, R0, c[5].x;\n"
- "SGE R2.xyz, R4, R0.w;\n"
- "MAD R2.xyz, R2, R5, R3;\n"
+ "MUL R2.xyz, fragment.color.primary, c[4].y;\n"
+ "MAD R5.xyz, -R4, R5, fragment.color.primary.w;\n"
+ "MAD R3.xyz, fragment.color.primary.w, R0, R3;\n"
+ "MAD R4.xyz, -R0, R5, R3;\n"
+ "MUL R3.xyz, R0, c[4].w;\n"
+ "MUL R5.xyz, R0, R5;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "MAD R3.xyz, R3, R4, R5;\n"
+ "MAD R3.xyz, -R0, R1, R3;\n"
"MUL R1.xyz, R0, R1;\n"
- "MUL R3.xyz, fragment.color.primary, c[4].z;\n"
- "ADD R2.xyz, R2, -R1;\n"
- "SGE R3.xyz, R3, fragment.color.primary.w;\n"
- "MAD R1.xyz, R3, R2, R1;\n"
- "ADD R1.w, -R0, c[4].x;\n"
- "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
- "ADD R1.w, -fragment.color.primary, c[4].x;\n"
- "MAD R2.xyz, R0, R1.w, R1;\n"
+ "SGE R2.xyz, R2, fragment.color.primary.w;\n"
+ "MAD R2.xyz, R2, R3, R1;\n"
+ "ADD R1.x, -R0.w, c[4];\n"
+ "MAD R2.xyz, fragment.color.primary, R1.x, R2;\n"
+ "ADD R1.x, -fragment.color.primary.w, c[4];\n"
+ "MAD R2.xyz, R0, R1.x, R2;\n"
"ADD R1.z, fragment.color.primary.w, R0.w;\n"
"MAD R2.w, -fragment.color.primary, R0, R1.z;\n"
"ADD R1.xy, fragment.position, c[2];\n"
@@ -861,8 +861,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[3] = { program.local[0],\n"
- " { 1, 9.9999997e-006, 2, 3 },\n"
- " { 8 } };\n"
+ " { 1, 2, 9.9999997e-006, 8 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -871,41 +871,41 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_SOLID_COMPOSITION_MODE
"TEMP R5;\n"
"MUL R0.xy, fragment.position, c[0];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MAX R1.x, R0.w, c[1].y;\n"
+ "MAX R1.x, R0.w, c[1].z;\n"
"RCP R1.w, R1.x;\n"
- "MUL R2.xyz, R0, R1.w;\n"
- "MUL R1.xyz, -R2, c[2].x;\n"
- "ADD R4.xyz, R1, c[1].w;\n"
- "MAD R1.xyz, -R0, R1.w, c[1].x;\n"
- "RSQ R2.w, R2.x;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "RCP R2.x, R2.w;\n"
+ "MUL R1.xyz, R0, R1.w;\n"
+ "MUL R4.xyz, -R1, c[1].w;\n"
+ "RSQ R2.x, R1.x;\n"
+ "RSQ R2.z, R1.z;\n"
+ "RSQ R2.y, R1.y;\n"
+ "RCP R2.x, R2.x;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R5.xyz, R0.w, R2, -R0;\n"
- "MAD R2.xyz, fragment.color.primary, c[1].z, -fragment.color.primary.w;\n"
- "MUL R3.xyz, R1, R2;\n"
- "MAD R3.xyz, -R3, R4, fragment.color.primary.w;\n"
- "MUL R4.xyz, R5, R2;\n"
+ "MAD R3.xyz, R0.w, R2, -R0;\n"
+ "MAD R2.xyz, fragment.color.primary, c[1].y, -fragment.color.primary.w;\n"
+ "MUL R3.xyz, R2, R3;\n"
+ "MAD R3.xyz, fragment.color.primary.w, R0, R3;\n"
+ "MAD R1.xyz, -R0, R1.w, c[1].x;\n"
+ "ADD R5.xyz, R4, c[2].x;\n"
+ "MUL R4.xyz, R1, R2;\n"
"MAD R1.xyz, -R1, R2, fragment.color.primary.w;\n"
- "MUL R3.xyz, R0, R3;\n"
- "MAD R4.xyz, fragment.color.primary.w, R0, R4;\n"
- "ADD R5.xyz, R4, -R3;\n"
- "MUL R4.xyz, R0, c[2].x;\n"
- "SGE R2.xyz, R4, R0.w;\n"
- "MAD R2.xyz, R2, R5, R3;\n"
+ "MAD R5.xyz, -R4, R5, fragment.color.primary.w;\n"
+ "MAD R4.xyz, -R0, R5, R3;\n"
+ "MUL R3.xyz, R0, c[1].w;\n"
+ "MUL R2.xyz, fragment.color.primary, c[1].y;\n"
+ "MUL R5.xyz, R0, R5;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "MAD R3.xyz, R3, R4, R5;\n"
+ "MAD R3.xyz, -R0, R1, R3;\n"
"MUL R1.xyz, R0, R1;\n"
- "MUL R3.xyz, fragment.color.primary, c[1].z;\n"
- "ADD R2.xyz, R2, -R1;\n"
- "SGE R3.xyz, R3, fragment.color.primary.w;\n"
- "MAD R1.xyz, R3, R2, R1;\n"
- "ADD R1.w, -R0, c[1].x;\n"
- "MAD R1.xyz, fragment.color.primary, R1.w, R1;\n"
- "ADD R1.w, fragment.color.primary, R0;\n"
- "ADD R2.x, -fragment.color.primary.w, c[1];\n"
- "MAD result.color.xyz, R0, R2.x, R1;\n"
- "MAD result.color.w, -fragment.color.primary, R0, R1;\n"
+ "SGE R2.xyz, R2, fragment.color.primary.w;\n"
+ "MAD R2.xyz, R2, R3, R1;\n"
+ "ADD R1.x, -R0.w, c[1];\n"
+ "MAD R2.xyz, fragment.color.primary, R1.x, R2;\n"
+ "ADD R1.x, fragment.color.primary.w, R0.w;\n"
+ "ADD R1.y, -fragment.color.primary.w, c[1].x;\n"
+ "MAD result.color.xyz, R0, R1.y, R2;\n"
+ "MAD result.color.w, -fragment.color.primary, R0, R1.x;\n"
"END\n"
;
@@ -1085,18 +1085,18 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"ADD R0.z, R0, R0.w;\n"
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MOV R0.x, c[9];\n"
"MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.z, R0.y, R0.y, -R0;\n"
"ADD R3.xy, fragment.position, c[7];\n"
- "MUL R0.y, R0.z, c[9];\n"
- "MUL R0.x, R0, c[9];\n"
- "MAD R0.z, R0.x, R0.x, -R0.y;\n"
- "MOV R0.y, c[9].x;\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RSQ R0.z, R0.z;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.z, R0.x, R0.y;\n"
+ "RCP R0.x, R0.z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0.y, R0;\n"
+ "MUL R0.z, R0.x, R0;\n"
"TEX R1, R0.z, texture[2], 1D;\n"
"MUL R0.xy, fragment.position, c[6];\n"
"TEX R0, R0, texture[0], 2D;\n"
@@ -1125,24 +1125,24 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MOV R0.x, c[9];\n"
"MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.z, R0.y, R0.y, -R0;\n"
"MUL R1.xy, fragment.position, c[6];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "MUL R0.y, R0.z, c[9];\n"
- "MUL R0.x, R0, c[9];\n"
- "MAD R0.z, R0.x, R0.x, -R0.y;\n"
- "MOV R0.y, c[9].x;\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RSQ R0.z, R0.z;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
+ "RCP R0.x, R0.z;\n"
"ADD R2.w, -R1, c[9].z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0.y, R0;\n"
+ "MUL R0.x, R0, R0.z;\n"
+ "TEX R0, R0, texture[2], 1D;\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
@@ -1283,20 +1283,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MOV R0.x, c[9];\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[9];\n"
- "MUL R0.x, R0, c[9];\n"
- "MAD R0.z, R0.x, R0.x, -R0.y;\n"
- "MOV R0.y, c[9].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.z, R0.y, R0.y, -R0;\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RSQ R0.z, R0.z;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
+ "RCP R0.x, R0.z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0.y, R0;\n"
+ "MUL R0.x, R0, R0.z;\n"
"TEX R0, R0, texture[2], 1D;\n"
"MAX R1.x, R0.w, c[9].w;\n"
"RCP R1.x, R1.x;\n"
@@ -1350,17 +1350,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[9];\n"
- "MUL R0.x, R0, c[9];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[9];\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.z;\n"
+ "ADD R0.x, -R0.y, R0.z;\n"
+ "RCP R0.y, R0.w;\n"
"MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, c[9].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[2], 1D;\n"
"MUL R2.xyz, R0.w, R1;\n"
@@ -1408,24 +1408,24 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MOV R0.x, c[9];\n"
"MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.z, R0.y, R0.y, -R0;\n"
"MUL R1.xy, fragment.position, c[6];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "MUL R0.y, R0.z, c[9];\n"
- "MUL R0.x, R0, c[9];\n"
- "MAD R0.z, R0.x, R0.x, -R0.y;\n"
- "MOV R0.y, c[9].x;\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RSQ R0.z, R0.z;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
- "TEX R0, R0, texture[2], 1D;\n"
+ "RCP R0.x, R0.z;\n"
"ADD R2.w, -R1, c[9].z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0.y, R0;\n"
+ "MUL R0.x, R0, R0.z;\n"
+ "TEX R0, R0, texture[2], 1D;\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
@@ -1457,7 +1457,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..8],\n"
" { 2, 4, 1, 9.9999997e-006 },\n"
- " { 3, 8 } };\n"
+ " { 8, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -1469,65 +1469,65 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MAD R0.xyz, fragment.position.x, c[2], R0;\n"
"ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
+ "MUL R1.xy, fragment.position, c[6];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
+ "MAX R0.w, R1, c[9];\n"
+ "RCP R2.w, R0.w;\n"
+ "MUL R5.xyz, R1, R2.w;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
+ "MUL R0.y, R0.x, c[9].x;\n"
+ "MOV R0.x, c[9];\n"
+ "RSQ R2.x, R5.x;\n"
+ "RSQ R2.z, R5.z;\n"
+ "RSQ R2.y, R5.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[9];\n"
- "MUL R0.x, R0, c[9];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MOV R0.z, c[9].x;\n"
- "MUL R1.y, R0.z, c[1].x;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "ADD R1.x, -R0, R0.y;\n"
- "RCP R1.y, R1.y;\n"
- "MUL R0.xy, fragment.position, c[6];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "MAX R1.z, R0.w, c[9].w;\n"
- "RCP R2.w, R1.z;\n"
- "MUL R2.xyz, R0, R2.w;\n"
- "MAD R6.xyz, -R2, c[10].y, c[10].x;\n"
- "MAD R3.xyz, -R0, R2.w, c[9].z;\n"
- "RSQ R2.w, R2.x;\n"
- "RCP R2.x, R2.w;\n"
- "MUL R1.x, R1, R1.y;\n"
- "TEX R1, R1, texture[2], 1D;\n"
- "MAD R4.xyz, R1, c[9].x, -R1.w;\n"
- "MUL R5.xyz, R3, R4;\n"
- "MAD R5.xyz, -R5, R6, R1.w;\n"
- "MAD R3.xyz, -R3, R4, R1.w;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "MUL R5.xyz, R0, R5;\n"
- "MUL R3.xyz, R0, R3;\n"
- "ADD R2.w, -R0, c[9].z;\n"
+ "MUL R0.z, R0, c[9].y;\n"
+ "MAD R0.z, R0.y, R0.y, -R0;\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
+ "RSQ R0.z, R0.z;\n"
+ "RCP R0.x, R0.z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0.y, R0;\n"
+ "MUL R0.x, R0, R0.z;\n"
+ "TEX R0, R0, texture[2], 1D;\n"
+ "MAD R3.xyz, R0, c[9].x, -R0.w;\n"
+ "MAD R6.xyz, -R5, c[10].x, c[10].y;\n"
+ "RCP R2.x, R2.x;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R0.w, R2, -R0;\n"
- "MUL R2.xyz, R2, R4;\n"
- "MAD R2.xyz, R1.w, R0, R2;\n"
- "ADD R6.xyz, R2, -R5;\n"
- "MUL R4.xyz, R1, c[9].x;\n"
- "MUL R2.xyz, R0, c[10].y;\n"
- "SGE R2.xyz, R2, R0.w;\n"
- "MAD R2.xyz, R2, R6, R5;\n"
+ "MAD R2.xyz, R1.w, R2, -R1;\n"
+ "MUL R2.xyz, R3, R2;\n"
+ "MAD R4.xyz, R0.w, R1, R2;\n"
+ "MAD R2.xyz, -R1, R2.w, c[9].z;\n"
+ "MUL R5.xyz, R2, R3;\n"
+ "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R5.xyz, -R1, R6, R4;\n"
+ "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MUL R3.xyz, R0, c[9].x;\n"
+ "MUL R4.xyz, R1, c[10].x;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "ADD R2.w, -R1, c[9].z;\n"
+ "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "ADD R2.xyz, R2, -R3;\n"
- "MAD R2.xyz, R4, R2, R3;\n"
- "MAD R1.xyz, R1, R2.w, R2;\n"
- "ADD R2.x, -R1.w, c[9].z;\n"
- "MAD R2.xyz, R0, R2.x, R1;\n"
- "ADD R1.z, R1.w, R0.w;\n"
- "MAD R2.w, -R1, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[7];\n"
- "MUL R1.xy, R1, c[5];\n"
- "TEX R1, R1, texture[1], 2D;\n"
- "ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[8];\n"
- "MAD result.color, R1.x, R2, R0;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R1, R2, R4;\n"
+ "MUL R2.xyz, R1, R2;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
+ "ADD R0.x, -R0.w, c[9].z;\n"
+ "MAD R2.xyz, R1, R0.x, R2;\n"
+ "ADD R0.z, R0.w, R1.w;\n"
+ "MAD R2.w, -R0, R1, R0.z;\n"
+ "ADD R0.xy, fragment.position, c[7];\n"
+ "MUL R0.xy, R0, c[5];\n"
+ "TEX R0, R0, texture[1], 2D;\n"
+ "ADD R2, R2, -R1;\n"
+ "DP4 R0.x, R0, c[8];\n"
+ "MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -1642,23 +1642,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[8];\n"
- "MUL R0.x, R0, c[8];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.z, R0.y;\n"
- "ADD R0.x, -R0, R0.z;\n"
+ "MUL R0.y, R0.x, c[8].x;\n"
+ "MUL R0.z, R0, c[8].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.x, R0.x;\n"
+ "RCP R0.z, R0.x;\n"
+ "ADD R0.y, -R0, R0.z;\n"
"MUL R0.zw, fragment.position.xyxy, c[7].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
"MUL R2.xyz, R1, c[5].y;\n"
- "MOV R0.y, c[8].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
+ "MOV R0.x, c[8];\n"
+ "MUL R0.x, R0, c[1];\n"
+ "RCP R0.x, R0.x;\n"
+ "MUL R0.x, R0.y, R0;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R3.xyz, R0.w, R2;\n"
"MUL R2.xyz, R0, c[5].x;\n"
@@ -1689,22 +1689,22 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.z, R0.y;\n"
- "ADD R0.x, -R0, R0.z;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.x, R0.x;\n"
+ "RCP R0.z, R0.x;\n"
+ "ADD R0.y, -R0, R0.z;\n"
"MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, c[6].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
+ "MOV R0.x, c[6];\n"
+ "MUL R0.x, R0, c[1];\n"
+ "RCP R0.x, R0.x;\n"
+ "MUL R0.x, R0.y, R0;\n"
"TEX R0, R0, texture[1], 1D;\n"
"ADD R2.x, -R1.w, c[6].z;\n"
"MUL R2.xyz, R0, R2.x;\n"
@@ -1733,16 +1733,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[6];\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.z;\n"
+ "ADD R0.x, -R0.y, R0.z;\n"
+ "RCP R0.y, R0.w;\n"
"MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
- "MOV R0.y, c[6].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
@@ -1765,27 +1765,27 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MOV R0.x, c[6];\n"
"MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.z, R0.y, R0.y, -R0;\n"
"MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.z, R0.x, R0.x, -R0.y;\n"
- "MOV R0.y, c[6].x;\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RSQ R0.z, R0.z;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
+ "RCP R0.x, R0.z;\n"
+ "ADD R2.w, -R1, c[6].z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0.y, R0;\n"
+ "MUL R0.x, R0, R0.z;\n"
"TEX R0, R0, texture[1], 1D;\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
- "ADD R2.w, -R1, c[6].z;\n"
"MUL R2.xyz, R2, c[6].x;\n"
"MAD R2.xyz, R0.w, R1.w, -R2;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
@@ -1822,17 +1822,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[6];\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.z;\n"
+ "ADD R0.x, -R0.y, R0.z;\n"
+ "RCP R0.y, R0.w;\n"
"MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, c[6].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
@@ -1865,17 +1865,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[6];\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.z;\n"
+ "ADD R0.x, -R0.y, R0.z;\n"
+ "RCP R0.y, R0.w;\n"
"MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, c[6].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0, R1.w;\n"
@@ -1904,20 +1904,20 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MOV R0.x, c[6];\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.z, R0.x, R0.x, -R0.y;\n"
- "MOV R0.y, c[6].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.z, R0.y, R0.y, -R0;\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RSQ R0.z, R0.z;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
+ "RCP R0.x, R0.z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0.y, R0;\n"
+ "MUL R0.x, R0, R0.z;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MAX R1.x, R0.w, c[6].w;\n"
"RCP R1.x, R1.x;\n"
@@ -1965,17 +1965,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[6];\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.z;\n"
+ "ADD R0.x, -R0.y, R0.z;\n"
+ "RCP R0.y, R0.w;\n"
"MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, c[6].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0.w, R1;\n"
@@ -2017,24 +2017,24 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MOV R0.x, c[6];\n"
"MUL R0.z, -R0, c[1].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.z, R0.y, R0.y, -R0;\n"
"MUL R1.xy, fragment.position, c[5];\n"
"TEX R1, R1, texture[0], 2D;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.z, R0.x, R0.x, -R0.y;\n"
- "MOV R0.y, c[6].x;\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RSQ R0.z, R0.z;\n"
- "RCP R0.z, R0.z;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
- "TEX R0, R0, texture[1], 1D;\n"
+ "RCP R0.x, R0.z;\n"
"ADD R2.w, -R1, c[6].z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0.y, R0;\n"
+ "MUL R0.x, R0, R0.z;\n"
+ "TEX R0, R0, texture[1], 1D;\n"
"ADD R3.xyz, R0.w, -R0;\n"
"ADD R2.xyz, R1.w, -R1;\n"
"MUL R2.xyz, R2, R3;\n"
@@ -2060,7 +2060,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..5],\n"
" { 2, 4, 1, 9.9999997e-006 },\n"
- " { 3, 8 } };\n"
+ " { 8, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2072,59 +2072,59 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MAD R0.xyz, fragment.position.x, c[2], R0;\n"
"ADD R0.xyz, R0, c[4];\n"
"RCP R0.z, R0.z;\n"
+ "MUL R1.xy, fragment.position, c[5];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
+ "MAX R0.w, R1, c[6];\n"
+ "RCP R2.w, R0.w;\n"
+ "MUL R5.xyz, R1, R2.w;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MOV R0.x, c[6];\n"
+ "RSQ R2.x, R5.x;\n"
+ "RSQ R2.z, R5.z;\n"
+ "RSQ R2.y, R5.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "MAX R0.z, R1.w, c[6].w;\n"
- "RCP R2.w, R0.z;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "MAD R6.xyz, -R2, c[7].y, c[7].x;\n"
- "MAD R3.xyz, -R1, R2.w, c[6].z;\n"
- "RSQ R2.w, R2.x;\n"
- "RCP R2.x, R2.w;\n"
- "RSQ R0.y, R0.y;\n"
- "RCP R0.y, R0.y;\n"
- "ADD R0.x, -R0, R0.y;\n"
- "MOV R0.y, c[6].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
- "MUL R0.x, R0, R0.y;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.z, R0.y, R0.y, -R0;\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
+ "RSQ R0.z, R0.z;\n"
+ "RCP R0.x, R0.z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0.y, R0;\n"
+ "MUL R0.x, R0, R0.z;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MAD R4.xyz, R0, c[6].x, -R0.w;\n"
- "MUL R5.xyz, R3, R4;\n"
- "MAD R5.xyz, -R5, R6, R0.w;\n"
- "MAD R3.xyz, -R3, R4, R0.w;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "MUL R5.xyz, R1, R5;\n"
- "MUL R3.xyz, R1, R3;\n"
+ "MAD R3.xyz, R0, c[6].x, -R0.w;\n"
+ "MAD R6.xyz, -R5, c[7].x, c[7].y;\n"
+ "RCP R2.x, R2.x;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
"MAD R2.xyz, R1.w, R2, -R1;\n"
- "MUL R2.xyz, R2, R4;\n"
- "MAD R2.xyz, R0.w, R1, R2;\n"
- "ADD R6.xyz, R2, -R5;\n"
- "MUL R4.xyz, R0, c[6].x;\n"
- "MUL R2.xyz, R1, c[7].y;\n"
- "SGE R2.xyz, R2, R1.w;\n"
- "MAD R2.xyz, R2, R6, R5;\n"
- "ADD R2.xyz, R2, -R3;\n"
- "SGE R4.xyz, R4, R0.w;\n"
- "MAD R2.xyz, R4, R2, R3;\n"
+ "MUL R2.xyz, R3, R2;\n"
+ "MAD R4.xyz, R0.w, R1, R2;\n"
+ "MAD R2.xyz, -R1, R2.w, c[6].z;\n"
+ "MUL R5.xyz, R2, R3;\n"
+ "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R5.xyz, -R1, R6, R4;\n"
+ "MUL R3.xyz, R0, c[6].x;\n"
+ "MUL R4.xyz, R1, c[7].x;\n"
+ "MUL R6.xyz, R1, R6;\n"
+ "SGE R4.xyz, R4, R1.w;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R1, R2, R4;\n"
+ "MUL R2.xyz, R1, R2;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
"ADD R2.w, -R1, c[6].z;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[6].z;\n"
- "MAD result.color.xyz, R1, R2.y, R0;\n"
- "MAD result.color.w, -R0, R1, R2.x;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
+ "ADD R0.x, R0.w, R1.w;\n"
+ "ADD R0.y, -R0.w, c[6].z;\n"
+ "MAD result.color.xyz, R1, R0.y, R2;\n"
+ "MAD result.color.w, -R0, R1, R0.x;\n"
"END\n"
;
@@ -2146,16 +2146,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[6];\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.z;\n"
+ "ADD R0.x, -R0.y, R0.z;\n"
+ "RCP R0.y, R0.w;\n"
"MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
- "MOV R0.y, c[6].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
@@ -2187,17 +2187,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
- "MUL R0.y, R0.z, c[6];\n"
- "MUL R0.x, R0, c[6];\n"
- "MAD R0.y, R0.x, R0.x, -R0;\n"
- "RSQ R0.z, R0.y;\n"
+ "MUL R0.y, R0.x, c[6].x;\n"
+ "MUL R0.z, R0, c[6].y;\n"
+ "MAD R0.x, R0.y, R0.y, -R0.z;\n"
+ "RSQ R0.z, R0.x;\n"
+ "MOV R0.x, c[6];\n"
+ "MUL R0.w, R0.x, c[1].x;\n"
"RCP R0.z, R0.z;\n"
- "ADD R0.x, -R0, R0.z;\n"
+ "ADD R0.x, -R0.y, R0.z;\n"
+ "RCP R0.y, R0.w;\n"
"MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MOV R0.y, c[6].x;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.y, R0.y;\n"
"MUL R0.x, R0, R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
"MUL R2.xyz, R0.w, R1;\n"
@@ -2225,8 +2225,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
- "MUL R0.xy, R0, c[0];\n"
"ADD R0.z, R0, R0.w;\n"
+ "MUL R0.xy, R0, c[0];\n"
"ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
"MUL R0.y, R0.z, c[8];\n"
@@ -2235,12 +2235,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"RSQ R0.y, R0.y;\n"
"RCP R0.y, R0.y;\n"
"ADD R1.x, -R0, R0.y;\n"
- "MOV R0.z, c[8].x;\n"
- "MUL R0.z, R0, c[1].x;\n"
- "RCP R1.y, R0.z;\n"
- "ADD R0.xy, fragment.position, c[6];\n"
- "MUL R0.xy, R0, c[5];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "MOV R0.x, c[8];\n"
+ "MUL R0.x, R0, c[1];\n"
+ "RCP R1.y, R0.x;\n"
+ "ADD R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
+ "MUL R0.zw, R0, c[5].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"MUL R1.x, R1, R1.y;\n"
"DP4 R1.y, R0, c[7];\n"
"TEX R0, R1, texture[1], 1D;\n"
@@ -2260,19 +2260,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.zw, R0.xyxy, R0.xyxy;\n"
"MUL R0.xy, R0, c[0];\n"
- "ADD R0.x, R0, R0.y;\n"
"ADD R0.z, R0, R0.w;\n"
+ "ADD R0.x, R0, R0.y;\n"
"MUL R0.z, -R0, c[1].x;\n"
"MUL R0.y, R0.z, c[5];\n"
"MUL R0.x, R0, c[5];\n"
"MAD R0.z, R0.x, R0.x, -R0.y;\n"
"MOV R0.y, c[5].x;\n"
"RSQ R0.z, R0.z;\n"
- "MUL R0.y, R0, c[1].x;\n"
- "RCP R0.z, R0.z;\n"
- "RCP R0.y, R0.y;\n"
- "ADD R0.x, -R0, R0.z;\n"
- "MUL R0.x, R0, R0.y;\n"
+ "MUL R0.w, R0.y, c[1].x;\n"
+ "RCP R0.y, R0.z;\n"
+ "RCP R0.z, R0.w;\n"
+ "ADD R0.x, -R0, R0.y;\n"
+ "MUL R0.x, R0, R0.z;\n"
"TEX result.color, R0, texture[0], 1D;\n"
"END\n"
;
@@ -2280,9 +2280,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_RADIAL_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF =
"!!ARBfp1.0\n"
"PARAM c[13] = { program.local[0..9],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2349,9 +2349,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_MULTIPLY =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2410,9 +2410,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SCREEN =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2467,9 +2467,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_OVERLAY =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
- " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
- " { 3.1415927, 0.15915494, 2, 1 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2542,9 +2542,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DARKEN =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2606,9 +2606,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_LIGHTEN =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2670,9 +2670,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORDODGE =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
- " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
- " { 3.1415927, 0.15915494, 1, 1e-006 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2747,9 +2747,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORBURN =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
- " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
- " { 3.1415927, 0.15915494, 1, 9.9999997e-006 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2761,16 +2761,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.z, R0.x;\n"
- "ABS R0.w, R0.y;\n"
- "ADD R0.w, R0, -R0.z;\n"
+ "ABS R0.w, R0.x;\n"
+ "ABS R0.z, R0.y;\n"
+ "ADD R0.z, R0, -R0.w;\n"
"ADD R1.x, R0.y, c[8];\n"
- "ABS R0.w, R0;\n"
- "CMP R0.y, -R0.w, R0, R1.x;\n"
- "ABS R0.w, -R0.y;\n"
- "MAX R1.x, R0.z, R0.w;\n"
+ "ABS R0.z, R0;\n"
+ "CMP R0.y, -R0.z, R0, R1.x;\n"
+ "ABS R0.z, -R0.y;\n"
+ "MAX R1.x, R0.w, R0.z;\n"
"RCP R1.y, R1.x;\n"
- "MIN R1.x, R0.z, R0.w;\n"
+ "MIN R1.x, R0.w, R0.z;\n"
"MUL R1.x, R1, R1.y;\n"
"MUL R1.y, R1.x, R1.x;\n"
"MAD R1.z, R1.y, c[8].y, c[8];\n"
@@ -2779,8 +2779,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"MAD R1.z, R1, R1.y, -c[9].y;\n"
"MAD R1.y, R1.z, R1, c[9].z;\n"
"MUL R1.x, R1.y, R1;\n"
- "ADD R0.z, -R0, R0.w;\n"
"ADD R1.y, -R1.x, c[9].w;\n"
+ "ADD R0.z, -R0.w, R0;\n"
"CMP R0.z, -R0, R1.y, R1.x;\n"
"ADD R0.w, -R0.z, c[10].x;\n"
"CMP R0.x, R0, R0.w, R0.z;\n"
@@ -2825,9 +2825,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_HARDLIGHT =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
- " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
- " { 3.1415927, 0.15915494, 2, 1 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2900,10 +2900,10 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[12] = { program.local[0..7],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1, 9.9999997e-006 },\n"
- " { 2, 3, 8 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 1, 2 },\n"
+ " { 9.9999997e-006, 8, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -2916,86 +2916,86 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.z, R0.x;\n"
- "ABS R0.w, R0.y;\n"
- "ADD R0.w, R0, -R0.z;\n"
- "ADD R1.x, R0.y, c[8].y;\n"
- "ABS R0.w, R0;\n"
- "CMP R0.y, -R0.w, R0, R1.x;\n"
- "ABS R0.w, -R0.y;\n"
- "MAX R1.x, R0.z, R0.w;\n"
+ "ABS R0.w, R0.x;\n"
+ "ABS R0.z, R0.y;\n"
+ "ADD R0.z, R0, -R0.w;\n"
+ "ADD R1.x, R0.y, c[8];\n"
+ "ABS R0.z, R0;\n"
+ "CMP R0.y, -R0.z, R0, R1.x;\n"
+ "ABS R0.z, -R0.y;\n"
+ "MAX R1.x, R0.w, R0.z;\n"
"RCP R1.y, R1.x;\n"
- "MIN R1.x, R0.z, R0.w;\n"
+ "MIN R1.x, R0.w, R0.z;\n"
"MUL R1.x, R1, R1.y;\n"
"MUL R1.y, R1.x, R1.x;\n"
- "MAD R1.z, R1.y, c[9].x, c[9].y;\n"
- "MAD R1.z, R1, R1.y, -c[9];\n"
- "MAD R1.z, R1, R1.y, c[9].w;\n"
- "MAD R1.z, R1, R1.y, -c[10].x;\n"
- "MAD R1.y, R1.z, R1, c[10];\n"
+ "MAD R1.z, R1.y, c[8].y, c[8];\n"
+ "MAD R1.z, R1, R1.y, -c[8].w;\n"
+ "MAD R1.z, R1, R1.y, c[9].x;\n"
+ "MAD R1.z, R1, R1.y, -c[9].y;\n"
+ "MAD R1.y, R1.z, R1, c[9].z;\n"
"MUL R1.x, R1.y, R1;\n"
- "ADD R1.y, -R1.x, c[8].w;\n"
- "ADD R0.z, -R0, R0.w;\n"
+ "ADD R1.y, -R1.x, c[9].w;\n"
+ "ADD R0.z, -R0.w, R0;\n"
"CMP R0.z, -R0, R1.y, R1.x;\n"
- "ADD R0.w, -R0.z, c[8].z;\n"
+ "ADD R0.w, -R0.z, c[10].x;\n"
"CMP R0.x, R0, R0.w, R0.z;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
"CMP R0.x, -R0.y, -R0, R0;\n"
+ "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "MAX R0.y, R1.w, c[11].x;\n"
+ "RCP R2.w, R0.y;\n"
+ "MUL R5.xyz, R1, R2.w;\n"
+ "RSQ R2.x, R5.x;\n"
+ "RSQ R2.z, R5.z;\n"
+ "RSQ R2.y, R5.y;\n"
"ADD R0.x, R0, c[0];\n"
- "MUL R1.x, R0, c[8];\n"
- "FLR R1.y, R1.x;\n"
- "MUL R0.xy, fragment.position, c[5];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "MAX R2.x, R0.w, c[10].w;\n"
- "RCP R2.w, R2.x;\n"
- "MUL R2.xyz, R0, R2.w;\n"
- "MAD R6.xyz, -R2, c[11].z, c[11].y;\n"
- "MAD R3.xyz, -R0, R2.w, c[10].z;\n"
- "RSQ R2.w, R2.x;\n"
- "RCP R2.x, R2.w;\n"
- "ADD R1.x, R1, -R1.y;\n"
- "TEX R1, R1, texture[2], 1D;\n"
- "MAD R4.xyz, R1, c[11].x, -R1.w;\n"
- "MUL R5.xyz, R3, R4;\n"
- "MAD R5.xyz, -R5, R6, R1.w;\n"
- "MAD R3.xyz, -R3, R4, R1.w;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "MUL R5.xyz, R0, R5;\n"
- "MUL R3.xyz, R0, R3;\n"
- "ADD R2.w, -R0, c[10].z;\n"
+ "MUL R0.x, R0, c[10].y;\n"
+ "FLR R0.y, R0.x;\n"
+ "ADD R0.x, R0, -R0.y;\n"
+ "TEX R0, R0, texture[2], 1D;\n"
+ "MAD R3.xyz, R0, c[10].w, -R0.w;\n"
+ "MAD R6.xyz, -R5, c[11].y, c[11].z;\n"
+ "RCP R2.x, R2.x;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R0.w, R2, -R0;\n"
- "MUL R2.xyz, R2, R4;\n"
- "MAD R2.xyz, R1.w, R0, R2;\n"
- "ADD R6.xyz, R2, -R5;\n"
- "MUL R4.xyz, R1, c[11].x;\n"
- "MUL R2.xyz, R0, c[11].z;\n"
- "SGE R2.xyz, R2, R0.w;\n"
- "MAD R2.xyz, R2, R6, R5;\n"
+ "MAD R2.xyz, R1.w, R2, -R1;\n"
+ "MUL R2.xyz, R3, R2;\n"
+ "MAD R4.xyz, R0.w, R1, R2;\n"
+ "MAD R2.xyz, -R1, R2.w, c[10].z;\n"
+ "MUL R5.xyz, R2, R3;\n"
+ "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R5.xyz, -R1, R6, R4;\n"
+ "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MUL R3.xyz, R0, c[10].w;\n"
+ "MUL R4.xyz, R1, c[11].y;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "ADD R2.w, -R1, c[10].z;\n"
+ "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "ADD R2.xyz, R2, -R3;\n"
- "MAD R2.xyz, R4, R2, R3;\n"
- "MAD R1.xyz, R1, R2.w, R2;\n"
- "ADD R2.x, -R1.w, c[10].z;\n"
- "MAD R2.xyz, R0, R2.x, R1;\n"
- "ADD R1.z, R1.w, R0.w;\n"
- "MAD R2.w, -R1, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[6];\n"
- "MUL R1.xy, R1, c[4];\n"
- "TEX R1, R1, texture[1], 2D;\n"
- "ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[7];\n"
- "MAD result.color, R1.x, R2, R0;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R1, R2, R4;\n"
+ "MUL R2.xyz, R1, R2;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
+ "ADD R0.x, -R0.w, c[10].z;\n"
+ "MAD R2.xyz, R1, R0.x, R2;\n"
+ "ADD R0.z, R0.w, R1.w;\n"
+ "MAD R2.w, -R0, R1, R0.z;\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
+ "TEX R0, R0, texture[1], 2D;\n"
+ "ADD R2, R2, -R1;\n"
+ "DP4 R0.x, R0, c[7];\n"
+ "MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DIFFERENCE =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 2 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3055,9 +3055,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_EXCLUSION =
"!!ARBfp1.0\n"
"PARAM c[11] = { program.local[0..7],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 2, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3120,9 +3120,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SIMPLE_PORTER_DUFF_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..6],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3183,9 +3183,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_MULTIPLY_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3238,9 +3238,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SCREEN_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3288,9 +3288,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_OVERLAY_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
- " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
- " { 3.1415927, 0.15915494, 2, 1 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3356,9 +3356,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DARKEN_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3414,9 +3414,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_LIGHTEN_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3472,9 +3472,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORDODGE_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
- " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
- " { 3.1415927, 0.15915494, 1, 1e-006 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 1, 1e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3542,9 +3542,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_COLORBURN_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
- " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
- " { 3.1415927, 0.15915494, 1, 9.9999997e-006 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 1, 9.9999997e-006 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3556,16 +3556,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.z, R0.x;\n"
- "ABS R0.w, R0.y;\n"
- "ADD R0.w, R0, -R0.z;\n"
+ "ABS R0.w, R0.x;\n"
+ "ABS R0.z, R0.y;\n"
+ "ADD R0.z, R0, -R0.w;\n"
"ADD R1.x, R0.y, c[5];\n"
- "ABS R0.w, R0;\n"
- "CMP R0.y, -R0.w, R0, R1.x;\n"
- "ABS R0.w, -R0.y;\n"
- "MAX R1.x, R0.z, R0.w;\n"
+ "ABS R0.z, R0;\n"
+ "CMP R0.y, -R0.z, R0, R1.x;\n"
+ "ABS R0.z, -R0.y;\n"
+ "MAX R1.x, R0.w, R0.z;\n"
"RCP R1.y, R1.x;\n"
- "MIN R1.x, R0.z, R0.w;\n"
+ "MIN R1.x, R0.w, R0.z;\n"
"MUL R1.x, R1, R1.y;\n"
"MUL R1.y, R1.x, R1.x;\n"
"MAD R1.z, R1.y, c[5].y, c[5];\n"
@@ -3574,8 +3574,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"MAD R1.z, R1, R1.y, -c[6].y;\n"
"MAD R1.y, R1.z, R1, c[6].z;\n"
"MUL R1.x, R1.y, R1;\n"
- "ADD R0.z, -R0, R0.w;\n"
"ADD R1.y, -R1.x, c[6].w;\n"
+ "ADD R0.z, -R0.w, R0;\n"
"CMP R0.z, -R0, R1.y, R1.x;\n"
"ADD R0.w, -R0.z, c[7].x;\n"
"CMP R0.x, R0, R0.w, R0.z;\n"
@@ -3614,9 +3614,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_HARDLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.0020000001, -0.01348047, 0.057477314, 0.12123907 },\n"
- " { 0.19563593, 0.33299461, 0.99999565, 1.5707964 },\n"
- " { 3.1415927, 0.15915494, 2, 1 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3683,10 +3683,10 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..4],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 1, 9.9999997e-006 },\n"
- " { 2, 3, 8 } };\n"
+ " { 0.0020000001, -0.01348047, 0.05747731, 0.1212391 },\n"
+ " { 0.1956359, 0.33299461, 0.99999559, 1.570796 },\n"
+ " { 3.141593, 0.15915494, 1, 2 },\n"
+ " { 9.9999997e-006, 8, 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3699,80 +3699,80 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
- "ABS R0.z, R0.x;\n"
- "ABS R0.w, R0.y;\n"
- "ADD R0.w, R0, -R0.z;\n"
- "ADD R1.x, R0.y, c[5].y;\n"
- "ABS R0.w, R0;\n"
- "CMP R0.y, -R0.w, R0, R1.x;\n"
- "ABS R0.w, -R0.y;\n"
- "MAX R1.x, R0.z, R0.w;\n"
+ "ABS R0.w, R0.x;\n"
+ "ABS R0.z, R0.y;\n"
+ "ADD R0.z, R0, -R0.w;\n"
+ "ADD R1.x, R0.y, c[5];\n"
+ "ABS R0.z, R0;\n"
+ "CMP R0.y, -R0.z, R0, R1.x;\n"
+ "ABS R0.z, -R0.y;\n"
+ "MAX R1.x, R0.w, R0.z;\n"
"RCP R1.y, R1.x;\n"
- "MIN R1.x, R0.z, R0.w;\n"
+ "MIN R1.x, R0.w, R0.z;\n"
"MUL R1.x, R1, R1.y;\n"
"MUL R1.y, R1.x, R1.x;\n"
- "MAD R1.z, R1.y, c[6].x, c[6].y;\n"
- "MAD R1.z, R1, R1.y, -c[6];\n"
- "MAD R1.z, R1, R1.y, c[6].w;\n"
- "MAD R1.z, R1, R1.y, -c[7].x;\n"
- "MAD R1.y, R1.z, R1, c[7];\n"
+ "MAD R1.z, R1.y, c[5].y, c[5];\n"
+ "MAD R1.z, R1, R1.y, -c[5].w;\n"
+ "MAD R1.z, R1, R1.y, c[6].x;\n"
+ "MAD R1.z, R1, R1.y, -c[6].y;\n"
+ "MAD R1.y, R1.z, R1, c[6].z;\n"
"MUL R1.x, R1.y, R1;\n"
- "ADD R0.z, -R0, R0.w;\n"
- "ADD R1.y, -R1.x, c[5].w;\n"
+ "ADD R1.y, -R1.x, c[6].w;\n"
+ "ADD R0.z, -R0.w, R0;\n"
"CMP R0.z, -R0, R1.y, R1.x;\n"
- "ADD R0.w, -R0.z, c[5].z;\n"
+ "ADD R0.w, -R0.z, c[7].x;\n"
"CMP R0.x, R0, R0.w, R0.z;\n"
- "CMP R0.x, -R0.y, -R0, R0;\n"
"MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "CMP R0.x, -R0.y, -R0, R0;\n"
"TEX R1, R0.zwzw, texture[0], 2D;\n"
- "MAX R2.x, R1.w, c[7].w;\n"
- "RCP R2.w, R2.x;\n"
- "MUL R2.xyz, R1, R2.w;\n"
- "MAD R6.xyz, -R2, c[8].z, c[8].y;\n"
- "MAD R3.xyz, -R1, R2.w, c[7].z;\n"
- "RSQ R2.w, R2.x;\n"
- "RCP R2.x, R2.w;\n"
+ "MAX R0.y, R1.w, c[8].x;\n"
+ "RCP R2.w, R0.y;\n"
+ "MUL R5.xyz, R1, R2.w;\n"
+ "RSQ R2.x, R5.x;\n"
+ "RSQ R2.z, R5.z;\n"
+ "RSQ R2.y, R5.y;\n"
"ADD R0.x, R0, c[0];\n"
- "MUL R0.x, R0, c[5];\n"
+ "MUL R0.x, R0, c[7].y;\n"
"FLR R0.y, R0.x;\n"
"ADD R0.x, R0, -R0.y;\n"
"TEX R0, R0, texture[1], 1D;\n"
- "MAD R4.xyz, R0, c[8].x, -R0.w;\n"
- "MUL R5.xyz, R3, R4;\n"
- "MAD R5.xyz, -R5, R6, R0.w;\n"
- "MAD R3.xyz, -R3, R4, R0.w;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "MUL R5.xyz, R1, R5;\n"
- "MUL R3.xyz, R1, R3;\n"
+ "MAD R3.xyz, R0, c[7].w, -R0.w;\n"
+ "MAD R6.xyz, -R5, c[8].y, c[8].z;\n"
+ "RCP R2.x, R2.x;\n"
"RCP R2.z, R2.z;\n"
"RCP R2.y, R2.y;\n"
"MAD R2.xyz, R1.w, R2, -R1;\n"
- "MUL R2.xyz, R2, R4;\n"
- "MAD R2.xyz, R0.w, R1, R2;\n"
- "ADD R6.xyz, R2, -R5;\n"
- "MUL R4.xyz, R0, c[8].x;\n"
- "MUL R2.xyz, R1, c[8].z;\n"
- "SGE R2.xyz, R2, R1.w;\n"
- "MAD R2.xyz, R2, R6, R5;\n"
- "ADD R2.xyz, R2, -R3;\n"
- "SGE R4.xyz, R4, R0.w;\n"
- "MAD R2.xyz, R4, R2, R3;\n"
+ "MUL R2.xyz, R3, R2;\n"
+ "MAD R4.xyz, R0.w, R1, R2;\n"
+ "MAD R2.xyz, -R1, R2.w, c[7].z;\n"
+ "MUL R5.xyz, R2, R3;\n"
+ "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R5.xyz, -R1, R6, R4;\n"
+ "MUL R3.xyz, R0, c[7].w;\n"
+ "MUL R4.xyz, R1, c[8].y;\n"
+ "MUL R6.xyz, R1, R6;\n"
+ "SGE R4.xyz, R4, R1.w;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R1, R2, R4;\n"
+ "MUL R2.xyz, R1, R2;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
"ADD R2.w, -R1, c[7].z;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[7].z;\n"
- "MAD result.color.xyz, R1, R2.y, R0;\n"
- "MAD result.color.w, -R0, R1, R2.x;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
+ "ADD R0.x, R0.w, R1.w;\n"
+ "ADD R0.y, -R0.w, c[7].z;\n"
+ "MAD result.color.xyz, R1, R0.y, R2;\n"
+ "MAD result.color.w, -R0, R1, R0.x;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_DIFFERENCE_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 2 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3826,9 +3826,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODES_EXCLUSION_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[8] = { program.local[0..4],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565, 2, 1 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559, 2, 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -3885,9 +3885,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODE_BLEND_MODE_MASK =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..6],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"MUL R0.xyz, fragment.position.y, c[2];\n"
@@ -3919,11 +3919,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
"ADD R0.w, -R0.z, c[7].z;\n"
"CMP R0.x, R0, R0.w, R0.z;\n"
"CMP R0.x, -R0.y, -R0, R0;\n"
- "ADD R0.z, R0.x, c[0].x;\n"
- "MUL R1.x, R0.z, c[7];\n"
+ "ADD R0.x, R0, c[0];\n"
+ "MUL R1.x, R0, c[7];\n"
"FLR R1.y, R1.x;\n"
- "ADD R0.xy, fragment.position, c[5];\n"
- "MUL R0.xy, R0, c[4];\n"
+ "ADD R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "MUL R0.xy, R0.zwzw, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
"ADD R1.x, R1, -R1.y;\n"
"DP4 R1.y, R0, c[6];\n"
@@ -3935,9 +3935,9 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_CONICAL_COMPOSITION_MODE_BLEND_MODE_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..3],\n"
- " { 0.15915494, 0.0020000001, 3.1415927, 1.5707964 },\n"
- " { -0.01348047, 0.057477314, 0.12123907, 0.19563593 },\n"
- " { 0.33299461, 0.99999565 } };\n"
+ " { 0.15915494, 0.0020000001, 3.141593, 1.570796 },\n"
+ " { -0.01348047, 0.05747731, 0.1212391, 0.1956359 },\n"
+ " { 0.33299461, 0.99999559 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"MUL R0.xyz, fragment.position.y, c[2];\n"
@@ -4356,8 +4356,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..7],\n"
- " { 1, 9.9999997e-006, 2, 3 },\n"
- " { 8 } };\n"
+ " { 1, 2, 9.9999997e-006, 8 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -4365,58 +4365,58 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R2.xyz, fragment.position.y, c[2];\n"
- "MAD R3.xyz, fragment.position.x, c[1], R2;\n"
"MUL R0.xy, fragment.position, c[5];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "MAX R1.x, R0.w, c[8].y;\n"
- "RCP R2.w, R1.x;\n"
- "MUL R1.xyz, R0, R2.w;\n"
- "RSQ R1.w, R1.x;\n"
- "RSQ R2.y, R1.y;\n"
- "ADD R3.xyz, R3, c[3];\n"
- "RCP R2.x, R1.w;\n"
- "RCP R1.w, R3.z;\n"
- "MUL R3.xy, R3, R1.w;\n"
- "RSQ R1.w, R1.z;\n"
- "RCP R2.z, R1.w;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R6.xyz, R0.w, R2, -R0;\n"
- "MUL R2.xyz, -R1, c[9].x;\n"
- "ADD R5.xyz, R2, c[8].w;\n"
- "MAD R2.xyz, -R0, R2.w, c[8].x;\n"
- "MUL R3.xy, R3, c[0];\n"
- "ADD R1.w, R3.x, R3.y;\n"
- "MUL R1.w, R1, c[0].z;\n"
- "TEX R1, R1.w, texture[2], 1D;\n"
- "MAD R3.xyz, R1, c[8].z, -R1.w;\n"
- "MUL R4.xyz, R2, R3;\n"
- "MAD R4.xyz, -R4, R5, R1.w;\n"
- "MAD R2.xyz, -R2, R3, R1.w;\n"
- "MUL R5.xyz, R6, R3;\n"
- "MUL R4.xyz, R0, R4;\n"
- "MAD R5.xyz, R1.w, R0, R5;\n"
- "ADD R6.xyz, R5, -R4;\n"
- "MUL R5.xyz, R0, c[9].x;\n"
- "SGE R3.xyz, R5, R0.w;\n"
- "MAD R3.xyz, R3, R6, R4;\n"
- "MUL R2.xyz, R0, R2;\n"
- "MUL R4.xyz, R1, c[8].z;\n"
+ "TEX R1, R0, texture[0], 2D;\n"
+ "MAX R0.w, R1, c[8].z;\n"
+ "RCP R2.w, R0.w;\n"
+ "MUL R2.xyz, R1, R2.w;\n"
+ "RSQ R0.w, R2.x;\n"
+ "MUL R5.xyz, -R2, c[8].w;\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "ADD R0.x, R0, R0.y;\n"
+ "RSQ R0.z, R2.y;\n"
+ "RSQ R0.y, R2.z;\n"
+ "MAD R2.xyz, -R1, R2.w, c[8].x;\n"
+ "RCP R3.x, R0.w;\n"
+ "RCP R3.y, R0.z;\n"
+ "RCP R3.z, R0.y;\n"
+ "MUL R0.x, R0, c[0].z;\n"
+ "TEX R0, R0, texture[2], 1D;\n"
+ "MAD R4.xyz, R1.w, R3, -R1;\n"
+ "MAD R3.xyz, R0, c[8].y, -R0.w;\n"
+ "MUL R4.xyz, R3, R4;\n"
+ "ADD R6.xyz, R5, c[9].x;\n"
+ "MUL R5.xyz, R2, R3;\n"
+ "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MUL R3.xyz, R0, c[8].y;\n"
+ "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R4.xyz, R0.w, R1, R4;\n"
+ "MAD R5.xyz, -R1, R6, R4;\n"
+ "MUL R4.xyz, R1, c[8].w;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "ADD R2.w, -R1, c[8].x;\n"
+ "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "ADD R3.xyz, R3, -R2;\n"
- "MAD R2.xyz, R4, R3, R2;\n"
- "ADD R2.w, -R0, c[8].x;\n"
- "MAD R1.xyz, R1, R2.w, R2;\n"
- "ADD R2.x, -R1.w, c[8];\n"
- "MAD R2.xyz, R0, R2.x, R1;\n"
- "ADD R1.z, R1.w, R0.w;\n"
- "MAD R2.w, -R1, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[6];\n"
- "MUL R1.xy, R1, c[4];\n"
- "TEX R1, R1, texture[1], 2D;\n"
- "ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[7];\n"
- "MAD result.color, R1.x, R2, R0;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R1, R2, R4;\n"
+ "MUL R2.xyz, R1, R2;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
+ "ADD R0.x, -R0.w, c[8];\n"
+ "MAD R2.xyz, R1, R0.x, R2;\n"
+ "ADD R0.z, R0.w, R1.w;\n"
+ "MAD R2.w, -R0, R1, R0.z;\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
+ "TEX R0, R0, texture[1], 2D;\n"
+ "ADD R2, R2, -R1;\n"
+ "DP4 R0.x, R0, c[7];\n"
+ "MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -4815,8 +4815,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..4],\n"
- " { 1, 9.9999997e-006, 2, 3 },\n"
- " { 8 } };\n"
+ " { 1, 2, 9.9999997e-006, 8 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -4824,52 +4824,52 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_LINEAR_COMPOSITION_MOD
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R2.xyz, fragment.position.y, c[2];\n"
- "MAD R3.xyz, fragment.position.x, c[1], R2;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R1, R0, texture[0], 2D;\n"
- "MAX R0.x, R1.w, c[5].y;\n"
- "RCP R2.w, R0.x;\n"
- "MUL R0.xyz, R1, R2.w;\n"
- "RSQ R0.w, R0.x;\n"
- "RSQ R2.y, R0.y;\n"
- "ADD R3.xyz, R3, c[3];\n"
- "RCP R2.x, R0.w;\n"
- "RCP R0.w, R3.z;\n"
- "MUL R3.xy, R3, R0.w;\n"
- "RSQ R0.w, R0.z;\n"
- "RCP R2.z, R0.w;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R6.xyz, R1.w, R2, -R1;\n"
- "MUL R2.xyz, -R0, c[6].x;\n"
- "ADD R5.xyz, R2, c[5].w;\n"
+ "MAX R0.w, R1, c[5].z;\n"
+ "RCP R2.w, R0.w;\n"
+ "MUL R2.xyz, R1, R2.w;\n"
+ "RSQ R0.w, R2.x;\n"
+ "MUL R5.xyz, -R2, c[5].w;\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "ADD R0.x, R0, R0.y;\n"
+ "RSQ R0.z, R2.y;\n"
+ "RSQ R0.y, R2.z;\n"
"MAD R2.xyz, -R1, R2.w, c[5].x;\n"
- "MUL R3.xy, R3, c[0];\n"
- "ADD R0.w, R3.x, R3.y;\n"
- "MUL R0.w, R0, c[0].z;\n"
- "TEX R0, R0.w, texture[1], 1D;\n"
- "MAD R3.xyz, R0, c[5].z, -R0.w;\n"
- "MUL R4.xyz, R2, R3;\n"
- "MAD R4.xyz, -R4, R5, R0.w;\n"
- "MUL R5.xyz, R6, R3;\n"
+ "RCP R3.x, R0.w;\n"
+ "RCP R3.y, R0.z;\n"
+ "RCP R3.z, R0.y;\n"
+ "MUL R0.x, R0, c[0].z;\n"
+ "TEX R0, R0, texture[1], 1D;\n"
+ "MAD R4.xyz, R1.w, R3, -R1;\n"
+ "MAD R3.xyz, R0, c[5].y, -R0.w;\n"
+ "MUL R4.xyz, R3, R4;\n"
+ "ADD R6.xyz, R5, c[6].x;\n"
+ "MUL R5.xyz, R2, R3;\n"
"MAD R2.xyz, -R2, R3, R0.w;\n"
- "MUL R4.xyz, R1, R4;\n"
- "MAD R5.xyz, R0.w, R1, R5;\n"
- "ADD R6.xyz, R5, -R4;\n"
- "MUL R5.xyz, R1, c[6].x;\n"
- "SGE R3.xyz, R5, R1.w;\n"
- "MAD R3.xyz, R3, R6, R4;\n"
+ "MUL R3.xyz, R0, c[5].y;\n"
+ "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R4.xyz, R0.w, R1, R4;\n"
+ "MAD R5.xyz, -R1, R6, R4;\n"
+ "MUL R4.xyz, R1, c[5].w;\n"
+ "MUL R6.xyz, R1, R6;\n"
+ "SGE R4.xyz, R4, R1.w;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R1, R2, R4;\n"
"MUL R2.xyz, R1, R2;\n"
- "MUL R4.xyz, R0, c[5].z;\n"
- "ADD R3.xyz, R3, -R2;\n"
- "SGE R4.xyz, R4, R0.w;\n"
- "MAD R2.xyz, R4, R3, R2;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
"ADD R2.w, -R1, c[5].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[5].x;\n"
- "MAD result.color.xyz, R1, R2.y, R0;\n"
- "MAD result.color.w, -R0, R1, R2.x;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
+ "ADD R0.x, R0.w, R1.w;\n"
+ "ADD R0.y, -R0.w, c[5].x;\n"
+ "MAD result.color.xyz, R1, R0.y, R2;\n"
+ "MAD result.color.w, -R0, R1, R0.x;\n"
"END\n"
;
@@ -5333,8 +5333,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..7],\n"
- " { 1, 9.9999997e-006, 2, 3 },\n"
- " { 8 } };\n"
+ " { 1, 2, 9.9999997e-006, 8 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -5343,55 +5343,55 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R5;\n"
"TEMP R6;\n"
"MUL R0.xy, fragment.position, c[5];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "MAX R1.x, R0.w, c[8].y;\n"
- "RCP R2.w, R1.x;\n"
- "MUL R1.xyz, R0, R2.w;\n"
- "RSQ R1.w, R1.x;\n"
- "RCP R2.x, R1.w;\n"
- "RSQ R1.w, R1.y;\n"
- "RSQ R2.z, R1.z;\n"
- "MUL R3.xyz, fragment.position.y, c[2];\n"
- "MAD R3.xyz, fragment.position.x, c[1], R3;\n"
- "ADD R3.xyz, R3, c[3];\n"
- "RCP R2.y, R1.w;\n"
- "RCP R1.w, R3.z;\n"
- "MUL R3.xy, R3, R1.w;\n"
- "RCP R2.z, R2.z;\n"
- "MAD R6.xyz, R0.w, R2, -R0;\n"
- "MUL R2.xyz, -R1, c[9].x;\n"
- "ADD R5.xyz, R2, c[8].w;\n"
- "MAD R2.xyz, -R0, R2.w, c[8].x;\n"
- "MUL R3.xy, R3, c[0];\n"
- "TEX R1, R3, texture[2], 2D;\n"
- "MAD R3.xyz, R1, c[8].z, -R1.w;\n"
- "MUL R4.xyz, R2, R3;\n"
- "MAD R4.xyz, -R4, R5, R1.w;\n"
- "MAD R2.xyz, -R2, R3, R1.w;\n"
- "MUL R5.xyz, R6, R3;\n"
- "MUL R4.xyz, R0, R4;\n"
- "MAD R5.xyz, R1.w, R0, R5;\n"
- "ADD R6.xyz, R5, -R4;\n"
- "MUL R5.xyz, R0, c[9].x;\n"
- "SGE R3.xyz, R5, R0.w;\n"
- "MAD R3.xyz, R3, R6, R4;\n"
- "MUL R2.xyz, R0, R2;\n"
- "MUL R4.xyz, R1, c[8].z;\n"
+ "TEX R1, R0, texture[0], 2D;\n"
+ "MAX R0.x, R1.w, c[8].z;\n"
+ "RCP R2.w, R0.x;\n"
+ "MUL R2.xyz, R1, R2.w;\n"
+ "RSQ R0.w, R2.x;\n"
+ "RCP R3.x, R0.w;\n"
+ "RSQ R0.w, R2.y;\n"
+ "MUL R5.xyz, -R2, c[8].w;\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "RSQ R0.z, R2.z;\n"
+ "MAD R2.xyz, -R1, R2.w, c[8].x;\n"
+ "RCP R3.y, R0.w;\n"
+ "RCP R3.z, R0.z;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "TEX R0, R0, texture[2], 2D;\n"
+ "MAD R4.xyz, R1.w, R3, -R1;\n"
+ "MAD R3.xyz, R0, c[8].y, -R0.w;\n"
+ "MUL R4.xyz, R3, R4;\n"
+ "ADD R6.xyz, R5, c[9].x;\n"
+ "MUL R5.xyz, R2, R3;\n"
+ "MAD R2.xyz, -R2, R3, R0.w;\n"
+ "MUL R3.xyz, R0, c[8].y;\n"
+ "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R4.xyz, R0.w, R1, R4;\n"
+ "MAD R5.xyz, -R1, R6, R4;\n"
+ "MUL R4.xyz, R1, c[8].w;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "ADD R2.w, -R1, c[8].x;\n"
+ "MUL R6.xyz, R1, R6;\n"
"SGE R4.xyz, R4, R1.w;\n"
- "ADD R3.xyz, R3, -R2;\n"
- "MAD R2.xyz, R4, R3, R2;\n"
- "ADD R2.w, -R0, c[8].x;\n"
- "MAD R1.xyz, R1, R2.w, R2;\n"
- "ADD R2.x, -R1.w, c[8];\n"
- "MAD R2.xyz, R0, R2.x, R1;\n"
- "ADD R1.z, R1.w, R0.w;\n"
- "MAD R2.w, -R1, R0, R1.z;\n"
- "ADD R1.xy, fragment.position, c[6];\n"
- "MUL R1.xy, R1, c[4];\n"
- "TEX R1, R1, texture[1], 2D;\n"
- "ADD R2, R2, -R0;\n"
- "DP4 R1.x, R1, c[7];\n"
- "MAD result.color, R1.x, R2, R0;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R1, R2, R4;\n"
+ "MUL R2.xyz, R1, R2;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
+ "ADD R0.x, -R0.w, c[8];\n"
+ "MAD R2.xyz, R1, R0.x, R2;\n"
+ "ADD R0.z, R0.w, R1.w;\n"
+ "MAD R2.w, -R0, R1, R0.z;\n"
+ "ADD R0.xy, fragment.position, c[6];\n"
+ "MUL R0.xy, R0, c[4];\n"
+ "TEX R0, R0, texture[1], 2D;\n"
+ "ADD R2, R2, -R1;\n"
+ "DP4 R0.x, R0, c[7];\n"
+ "MAD result.color, R0.x, R2, R1;\n"
"END\n"
;
@@ -5475,10 +5475,10 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"MUL R0.xyz, fragment.position.y, c[2];\n"
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
- "RCP R1.x, R0.z;\n"
- "MUL R0.xy, R0, R1.x;\n"
- "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "MUL R1.xy, fragment.position, c[6];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
"MUL R2.xyz, R1, c[4].y;\n"
"MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
@@ -5508,10 +5508,10 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"MUL R0.xyz, fragment.position.y, c[2];\n"
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
- "RCP R1.x, R0.z;\n"
- "MUL R0.xy, R0, R1.x;\n"
- "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
- "TEX R1, R0.zwzw, texture[0], 2D;\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "MUL R1.xy, fragment.position, c[4];\n"
+ "TEX R1, R1, texture[0], 2D;\n"
"MUL R0.xy, R0, c[0];\n"
"TEX R0, R0, texture[1], 2D;\n"
"ADD R2.x, -R1.w, c[5];\n"
@@ -5768,8 +5768,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..4],\n"
- " { 1, 9.9999997e-006, 2, 3 },\n"
- " { 8 } };\n"
+ " { 1, 2, 9.9999997e-006, 8 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -5779,48 +5779,48 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_TEXTURE_COMPOSITION_MO
"TEMP R6;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R1, R0, texture[0], 2D;\n"
- "MAX R0.x, R1.w, c[5].y;\n"
+ "MAX R0.x, R1.w, c[5].z;\n"
"RCP R2.w, R0.x;\n"
- "MUL R0.xyz, R1, R2.w;\n"
- "RSQ R0.w, R0.x;\n"
- "RCP R2.x, R0.w;\n"
- "RSQ R0.w, R0.y;\n"
- "RSQ R2.z, R0.z;\n"
- "MUL R3.xyz, fragment.position.y, c[2];\n"
- "MAD R3.xyz, fragment.position.x, c[1], R3;\n"
- "ADD R3.xyz, R3, c[3];\n"
- "RCP R2.y, R0.w;\n"
- "RCP R0.w, R3.z;\n"
- "MUL R3.xy, R3, R0.w;\n"
- "RCP R2.z, R2.z;\n"
- "MAD R6.xyz, R1.w, R2, -R1;\n"
- "MUL R2.xyz, -R0, c[6].x;\n"
- "ADD R5.xyz, R2, c[5].w;\n"
+ "MUL R2.xyz, R1, R2.w;\n"
+ "RSQ R0.w, R2.x;\n"
+ "RCP R3.x, R0.w;\n"
+ "RSQ R0.w, R2.y;\n"
+ "MUL R5.xyz, -R2, c[5].w;\n"
+ "MUL R0.xyz, fragment.position.y, c[2];\n"
+ "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
+ "ADD R0.xyz, R0, c[3];\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "RSQ R0.z, R2.z;\n"
"MAD R2.xyz, -R1, R2.w, c[5].x;\n"
- "MUL R3.xy, R3, c[0];\n"
- "TEX R0, R3, texture[1], 2D;\n"
- "MAD R3.xyz, R0, c[5].z, -R0.w;\n"
- "MUL R4.xyz, R2, R3;\n"
- "MAD R4.xyz, -R4, R5, R0.w;\n"
- "MUL R5.xyz, R6, R3;\n"
+ "RCP R3.y, R0.w;\n"
+ "RCP R3.z, R0.z;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "TEX R0, R0, texture[1], 2D;\n"
+ "MAD R4.xyz, R1.w, R3, -R1;\n"
+ "MAD R3.xyz, R0, c[5].y, -R0.w;\n"
+ "MUL R4.xyz, R3, R4;\n"
+ "ADD R6.xyz, R5, c[6].x;\n"
+ "MUL R5.xyz, R2, R3;\n"
"MAD R2.xyz, -R2, R3, R0.w;\n"
- "MUL R4.xyz, R1, R4;\n"
- "MAD R5.xyz, R0.w, R1, R5;\n"
- "ADD R6.xyz, R5, -R4;\n"
- "MUL R5.xyz, R1, c[6].x;\n"
- "SGE R3.xyz, R5, R1.w;\n"
- "MAD R3.xyz, R3, R6, R4;\n"
+ "MUL R3.xyz, R0, c[5].y;\n"
+ "MAD R6.xyz, -R5, R6, R0.w;\n"
+ "MAD R4.xyz, R0.w, R1, R4;\n"
+ "MAD R5.xyz, -R1, R6, R4;\n"
+ "MUL R4.xyz, R1, c[5].w;\n"
+ "MUL R6.xyz, R1, R6;\n"
+ "SGE R4.xyz, R4, R1.w;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R1, R2, R4;\n"
"MUL R2.xyz, R1, R2;\n"
- "MUL R4.xyz, R0, c[5].z;\n"
- "ADD R3.xyz, R3, -R2;\n"
- "SGE R4.xyz, R4, R0.w;\n"
- "MAD R2.xyz, R4, R3, R2;\n"
+ "SGE R3.xyz, R3, R0.w;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
"ADD R2.w, -R1, c[5].x;\n"
- "MAD R0.xyz, R0, R2.w, R2;\n"
- "ADD R2.x, R0.w, R1.w;\n"
- "ADD R2.y, -R0.w, c[5].x;\n"
- "MAD result.color.xyz, R1, R2.y, R0;\n"
- "MAD result.color.w, -R0, R1, R2.x;\n"
+ "MAD R2.xyz, R0, R2.w, R2;\n"
+ "ADD R0.x, R0.w, R1.w;\n"
+ "ADD R0.y, -R0.w, c[5].x;\n"
+ "MAD result.color.xyz, R1, R0.y, R2;\n"
+ "MAD result.color.w, -R0, R1, R0.x;\n"
"END\n"
;
@@ -5927,12 +5927,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.zw, R0.xyxy, R0.z;\n"
- "MUL R1.xy, R0.zwzw, c[0];\n"
- "MOV R1.y, -R1;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "MUL R0.zw, R0.xyxy, c[0].xyxy;\n"
+ "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
"MUL R0.xy, fragment.position, c[7];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "TEX R1.x, R1, texture[2], 2D;\n"
+ "ADD R1.x, -R1, c[10];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R2.xyz, R0, c[4].y;\n"
"MUL R3.xyz, R1.w, R2;\n"
@@ -5968,12 +5968,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.zw, R0.xyxy, R0.z;\n"
- "MUL R1.xy, R0.zwzw, c[0];\n"
- "MOV R1.y, -R1;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "MUL R0.zw, R0.xyxy, c[0].xyxy;\n"
+ "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
"MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "TEX R1.x, R1, texture[2], 2D;\n"
+ "ADD R1.x, -R1, c[8];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"ADD R2.x, -R0.w, c[8];\n"
"MUL R2.xyz, R1, R2.x;\n"
@@ -5993,7 +5993,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SCREEN =
"!!ARBfp1.0\n"
- "PARAM c[8] = { program.local[0..7] };\n"
+ "PARAM c[9] = { program.local[0..7],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6004,12 +6005,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[2], 2D;\n"
- "MUL R0.xy, fragment.position, c[5];\n"
+ "TEX R0.x, R0, texture[2], 2D;\n"
+ "ADD R0.z, -R0.x, c[8].x;\n"
"ADD R3.xy, fragment.position, c[6];\n"
+ "MUL R1, fragment.color.primary, R0.z;\n"
+ "MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MUL R1, fragment.color.primary, R1.x;\n"
"ADD R2, R1, R0;\n"
"MAD R2, -R1, R0, R2;\n"
"MUL R3.xy, R3, c[4];\n"
@@ -6023,7 +6024,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_OVERLAY =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 2, 1 } };\n"
+ " { 1, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6035,25 +6036,25 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[2], 2D;\n"
- "MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R0.xy, fragment.position, c[5];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "ADD R2.w, -R0, c[8].y;\n"
+ "TEX R0.x, R0, texture[2], 2D;\n"
+ "ADD R0.x, -R0, c[8];\n"
+ "MUL R1, fragment.color.primary, R0.x;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
"ADD R3.xyz, R1.w, -R1;\n"
"ADD R2.xyz, R0.w, -R0;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[8].x;\n"
+ "MUL R2.xyz, R2, c[8].y;\n"
"MAD R2.xyz, R1.w, R0.w, -R2;\n"
"MUL R4.xyz, R1, R2.w;\n"
"MUL R3.xyz, R1, R0;\n"
"MAD R1.xyz, R1, R2.w, R2;\n"
- "ADD R2.x, -R1.w, c[8].y;\n"
- "MAD R3.xyz, R3, c[8].x, R4;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
+ "MAD R3.xyz, R3, c[8].y, R4;\n"
"MAD R3.xyz, R0, R2.x, R3;\n"
"MAD R1.xyz, R0, R2.x, R1;\n"
- "MUL R2.xyz, R0, c[8].x;\n"
+ "MUL R2.xyz, R0, c[8].y;\n"
"ADD R1.xyz, R1, -R3;\n"
"SGE R2.xyz, R2, R0.w;\n"
"MAD R2.xyz, R2, R1, R3;\n"
@@ -6082,11 +6083,10 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
+ "TEX R1.x, R0, texture[2], 2D;\n"
"MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
+ "ADD R1.x, -R1, c[8];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R3.xyz, R1.w, R0;\n"
"MUL R2.xyz, R1, R0.w;\n"
@@ -6120,11 +6120,10 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
+ "TEX R1.x, R0, texture[2], 2D;\n"
"MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
+ "ADD R1.x, -R1, c[8];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R3.xyz, R1.w, R0;\n"
"MUL R2.xyz, R1, R0.w;\n"
@@ -6159,13 +6158,13 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.y, -R0;\n"
"TEX R0.x, R0, texture[2], 2D;\n"
+ "ADD R0.x, -R0, c[8];\n"
"MUL R1, fragment.color.primary, R0.x;\n"
"MAX R0.x, R1.w, c[8].y;\n"
"RCP R0.x, R0.x;\n"
- "MAD R0.xyz, -R1, R0.x, c[8].x;\n"
- "MAX R2.xyz, R0, c[8].y;\n"
+ "MAD R2.xyz, -R1, R0.x, c[8].x;\n"
+ "MAX R2.xyz, R2, c[8].y;\n"
"MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
"ADD R2.w, -R1, c[8].x;\n"
@@ -6210,12 +6209,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
+ "TEX R0.x, R0, texture[2], 2D;\n"
+ "ADD R1.x, -R0, c[8];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R0.xy, fragment.position, c[5];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"MUL R2.xyz, R1.w, R0;\n"
"MAD R3.xyz, R1, R0.w, R2;\n"
"MAD R2.xyz, -R1.w, R0.w, R3;\n"
@@ -6249,7 +6247,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_HARDLIGHT =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 2, 1 } };\n"
+ " { 1, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6261,23 +6259,23 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[2], 2D;\n"
- "MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R0.xy, fragment.position, c[5];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "ADD R2.w, -R0, c[8].y;\n"
+ "TEX R0.x, R0, texture[2], 2D;\n"
+ "ADD R0.x, -R0, c[8];\n"
+ "MUL R1, fragment.color.primary, R0.x;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[5].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
"ADD R3.xyz, R1.w, -R1;\n"
"ADD R2.xyz, R0.w, -R0;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[8].x;\n"
+ "MUL R2.xyz, R2, c[8].y;\n"
"MAD R2.xyz, R1.w, R0.w, -R2;\n"
"MUL R4.xyz, R1, R2.w;\n"
"MAD R2.xyz, R1, R2.w, R2;\n"
"MUL R3.xyz, R1, R0;\n"
- "ADD R2.w, -R1, c[8].y;\n"
- "MAD R3.xyz, R3, c[8].x, R4;\n"
- "MUL R1.xyz, R1, c[8].x;\n"
+ "ADD R2.w, -R1, c[8].x;\n"
+ "MAD R3.xyz, R3, c[8].y, R4;\n"
+ "MUL R1.xyz, R1, c[8].y;\n"
"SGE R1.xyz, R1, R1.w;\n"
"MAD R3.xyz, R0, R2.w, R3;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
@@ -6297,8 +6295,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SOFTLIGHT =
"!!ARBfp1.0\n"
"PARAM c[10] = { program.local[0..7],\n"
- " { 1, 9.9999997e-006, 2, 3 },\n"
- " { 8 } };\n"
+ " { 1, 2, 9.9999997e-006, 8 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6306,50 +6304,50 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xyz, fragment.position.y, c[2];\n"
- "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
- "ADD R1.xyz, R0, c[3];\n"
- "RCP R0.z, R1.z;\n"
- "MUL R1.xy, R1, R0.z;\n"
- "MUL R1.xy, R1, c[0];\n"
- "MOV R1.y, -R1;\n"
"MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MAX R1.z, R0.w, c[8].y;\n"
- "RCP R2.w, R1.z;\n"
+ "MAX R1.w, R0, c[8].z;\n"
+ "RCP R2.w, R1.w;\n"
"MUL R2.xyz, R0, R2.w;\n"
- "MUL R6.xyz, -R2, c[9].x;\n"
- "MAD R3.xyz, -R0, R2.w, c[8].x;\n"
+ "RSQ R1.w, R2.x;\n"
+ "MUL R5.xyz, -R2, c[8].w;\n"
+ "MUL R1.xyz, fragment.position.y, c[2];\n"
+ "MAD R1.xyz, fragment.position.x, c[1], R1;\n"
+ "ADD R1.xyz, R1, c[3];\n"
+ "RCP R1.z, R1.z;\n"
+ "MUL R1.xy, R1, R1.z;\n"
+ "MUL R1.xy, R1, c[0];\n"
"TEX R1.x, R1, texture[2], 2D;\n"
+ "RSQ R1.z, R2.y;\n"
+ "RSQ R1.y, R2.z;\n"
+ "MAD R2.xyz, -R0, R2.w, c[8].x;\n"
+ "RCP R3.x, R1.w;\n"
+ "RCP R3.y, R1.z;\n"
+ "RCP R3.z, R1.y;\n"
+ "ADD R1.x, -R1, c[8];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MAD R4.xyz, R1, c[8].z, -R1.w;\n"
- "MUL R5.xyz, R3, R4;\n"
- "MAD R3.xyz, -R3, R4, R1.w;\n"
- "ADD R6.xyz, R6, c[8].w;\n"
- "MAD R5.xyz, -R5, R6, R1.w;\n"
- "RSQ R2.x, R2.x;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "MUL R5.xyz, R0, R5;\n"
- "MUL R3.xyz, R0, R3;\n"
+ "MAD R4.xyz, R0.w, R3, -R0;\n"
+ "MAD R3.xyz, R1, c[8].y, -R1.w;\n"
+ "MUL R4.xyz, R3, R4;\n"
+ "ADD R6.xyz, R5, c[9].x;\n"
+ "MUL R5.xyz, R2, R3;\n"
+ "MAD R2.xyz, -R2, R3, R1.w;\n"
+ "MUL R3.xyz, R1, c[8].y;\n"
+ "MAD R6.xyz, -R5, R6, R1.w;\n"
+ "MAD R4.xyz, R1.w, R0, R4;\n"
+ "MAD R5.xyz, -R0, R6, R4;\n"
+ "MUL R4.xyz, R0, c[8].w;\n"
+ "SGE R3.xyz, R3, R1.w;\n"
"ADD R2.w, -R0, c[8].x;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R0.w, R2, -R0;\n"
- "MUL R2.xyz, R2, R4;\n"
- "MAD R2.xyz, R1.w, R0, R2;\n"
- "ADD R6.xyz, R2, -R5;\n"
- "MUL R4.xyz, R1, c[8].z;\n"
- "MUL R2.xyz, R0, c[9].x;\n"
- "SGE R2.xyz, R2, R0.w;\n"
- "MAD R2.xyz, R2, R6, R5;\n"
- "SGE R4.xyz, R4, R1.w;\n"
- "ADD R2.xyz, R2, -R3;\n"
- "MAD R2.xyz, R4, R2, R3;\n"
- "MAD R1.xyz, R1, R2.w, R2;\n"
- "ADD R2.x, -R1.w, c[8];\n"
- "MAD R2.xyz, R0, R2.x, R1;\n"
+ "MUL R6.xyz, R0, R6;\n"
+ "SGE R4.xyz, R4, R0.w;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R0, R2, R4;\n"
+ "MUL R2.xyz, R0, R2;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
+ "MAD R2.xyz, R1, R2.w, R2;\n"
+ "ADD R1.x, -R1.w, c[8];\n"
+ "MAD R2.xyz, R0, R1.x, R2;\n"
"ADD R1.z, R1.w, R0.w;\n"
"MAD R2.w, -R1, R0, R1.z;\n"
"ADD R1.xy, fragment.position, c[6];\n"
@@ -6364,7 +6362,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_DIFFERENCE =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 2 } };\n"
+ " { 1, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6375,17 +6373,16 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
+ "TEX R1.x, R0, texture[2], 2D;\n"
"MUL R0.xy, fragment.position, c[5];\n"
+ "ADD R1.x, -R1, c[8];\n"
"TEX R0, R0, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"ADD R2.xyz, R1, R0;\n"
"MUL R3.xyz, R1.w, R0;\n"
"MUL R1.xyz, R1, R0.w;\n"
"MIN R1.xyz, R1, R3;\n"
- "MAD R2.xyz, -R1, c[8].x, R2;\n"
+ "MAD R2.xyz, -R1, c[8].y, R2;\n"
"ADD R1.z, R1.w, R0.w;\n"
"MAD R2.w, -R1, R0, R1.z;\n"
"ADD R1.xy, fragment.position, c[6];\n"
@@ -6400,7 +6397,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_EXCLUSION =
"!!ARBfp1.0\n"
"PARAM c[9] = { program.local[0..7],\n"
- " { 2, 1 } };\n"
+ " { 1, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6411,19 +6408,18 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[2], 2D;\n"
+ "TEX R1.x, R0, texture[2], 2D;\n"
"MUL R0.xy, fragment.position, c[5];\n"
"TEX R0, R0, texture[0], 2D;\n"
+ "ADD R1.x, -R1, c[8];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R2.xyz, R1.w, R0;\n"
"MAD R3.xyz, R1, R0.w, R2;\n"
"MUL R2.xyz, R1, R0;\n"
- "MAD R2.xyz, -R2, c[8].x, R3;\n"
- "ADD R2.w, -R0, c[8].y;\n"
+ "MAD R2.xyz, -R2, c[8].y, R3;\n"
+ "ADD R2.w, -R0, c[8].x;\n"
"MAD R1.xyz, R1, R2.w, R2;\n"
- "ADD R2.x, -R1.w, c[8].y;\n"
+ "ADD R2.x, -R1.w, c[8];\n"
"MAD R2.xyz, R0, R2.x, R1;\n"
"ADD R1.z, R1.w, R0.w;\n"
"MAD R2.w, -R1, R0, R1.z;\n"
@@ -6448,13 +6444,13 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.zw, R0.xyxy, R0.z;\n"
- "MUL R1.xy, R0.zwzw, c[0];\n"
- "MOV R1.y, -R1;\n"
- "MUL R0.xy, fragment.position, c[6];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "TEX R1.x, R0, texture[1], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[6].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"MUL R2.xyz, R0, c[4].y;\n"
- "TEX R1.x, R1, texture[1], 2D;\n"
+ "ADD R1.x, -R1, c[7];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R3.xyz, R1.w, R2;\n"
"MUL R2.xyz, R1, c[4].x;\n"
@@ -6483,12 +6479,12 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
"ADD R0.xyz, R0, c[3];\n"
"RCP R0.z, R0.z;\n"
- "MUL R0.zw, R0.xyxy, R0.z;\n"
- "MUL R1.xy, R0.zwzw, c[0];\n"
- "MOV R1.y, -R1;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "TEX R1.x, R1, texture[1], 2D;\n"
+ "MUL R0.xy, R0, R0.z;\n"
+ "MUL R0.xy, R0, c[0];\n"
+ "TEX R1.x, R0, texture[1], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
+ "ADD R1.x, -R1, c[5];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"ADD R2.x, -R0.w, c[5];\n"
"MUL R2.xyz, R1, R2.x;\n"
@@ -6502,7 +6498,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SCREEN_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[5] = { program.local[0..4] };\n"
+ "PARAM c[6] = { program.local[0..4],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6512,11 +6509,10 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R0.x, R0, texture[1], 2D;\n"
+ "ADD R1.x, -R0, c[5];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"ADD R2, R1, R0;\n"
"MAD result.color, -R1, R0, R2;\n"
@@ -6526,7 +6522,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_OVERLAY_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 2, 1 } };\n"
+ " { 1, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6537,25 +6533,25 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[1], 2D;\n"
- "MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R0.x, R0, texture[1], 2D;\n"
+ "ADD R0.x, -R0, c[5];\n"
+ "MUL R1, fragment.color.primary, R0.x;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"ADD R3.xyz, R1.w, -R1;\n"
"ADD R2.xyz, R0.w, -R0;\n"
"MUL R2.xyz, R2, R3;\n"
- "ADD R2.w, -R0, c[5].y;\n"
- "MUL R2.xyz, R2, c[5].x;\n"
+ "ADD R2.w, -R0, c[5].x;\n"
+ "MUL R2.xyz, R2, c[5].y;\n"
"MAD R2.xyz, R1.w, R0.w, -R2;\n"
"MAD R2.xyz, R1, R2.w, R2;\n"
"MUL R3.xyz, R1, R2.w;\n"
"MUL R1.xyz, R1, R0;\n"
- "ADD R2.w, -R1, c[5].y;\n"
- "MAD R1.xyz, R1, c[5].x, R3;\n"
+ "ADD R2.w, -R1, c[5].x;\n"
+ "MAD R1.xyz, R1, c[5].y, R3;\n"
"MAD R1.xyz, R0, R2.w, R1;\n"
"MAD R2.xyz, R0, R2.w, R2;\n"
- "MUL R0.xyz, R0, c[5].x;\n"
+ "MUL R0.xyz, R0, c[5].y;\n"
"ADD R2.w, R1, R0;\n"
"ADD R2.xyz, R2, -R1;\n"
"SGE R0.xyz, R0, R0.w;\n"
@@ -6578,11 +6574,10 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R0.x, R0, texture[1], 2D;\n"
+ "ADD R1.x, -R0, c[5];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R2.xyz, R1, R0.w;\n"
"MUL R3.xyz, R1.w, R0;\n"
@@ -6610,11 +6605,10 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R0.x, R0, texture[1], 2D;\n"
+ "ADD R1.x, -R0, c[5];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R2.xyz, R1, R0.w;\n"
"MUL R3.xyz, R1.w, R0;\n"
@@ -6642,31 +6636,31 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.y, -R0;\n"
"TEX R0.x, R0, texture[1], 2D;\n"
+ "ADD R0.x, -R0, c[5];\n"
"MUL R1, fragment.color.primary, R0.x;\n"
"MAX R0.x, R1.w, c[5].y;\n"
"RCP R0.x, R0.x;\n"
- "MAD R0.xyz, -R1, R0.x, c[5].x;\n"
- "MAX R2.xyz, R0, c[5].y;\n"
+ "MAD R3.xyz, -R1, R0.x, c[5].x;\n"
+ "MAX R3.xyz, R3, c[5].y;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "ADD R2.w, -R1, c[5].x;\n"
- "MUL R3.xyz, R0, R2.w;\n"
+ "ADD R2.x, -R1.w, c[5];\n"
+ "MUL R2.xyz, R0, R2.x;\n"
"ADD R2.w, -R0, c[5].x;\n"
- "MAD R3.xyz, R1, R2.w, R3;\n"
+ "MAD R2.xyz, R1, R2.w, R2;\n"
"MUL R0.xyz, R1.w, R0;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.y, R2.y;\n"
- "RCP R2.z, R2.z;\n"
- "MAD R2.xyz, R0, R2, R3;\n"
+ "RCP R3.x, R3.x;\n"
+ "RCP R3.y, R3.y;\n"
+ "RCP R3.z, R3.z;\n"
+ "MAD R3.xyz, R0, R3, R2;\n"
"MAD R0.xyz, R1, R0.w, R0;\n"
- "MAD R3.xyz, R1.w, R0.w, R3;\n"
+ "MAD R2.xyz, R1.w, R0.w, R2;\n"
"MUL R2.w, R1, R0;\n"
"ADD R1.x, R1.w, R0.w;\n"
- "ADD R3.xyz, R3, -R2;\n"
+ "ADD R2.xyz, R2, -R3;\n"
"SGE R0.xyz, R0, R2.w;\n"
- "MAD result.color.xyz, R0, R3, R2;\n"
+ "MAD result.color.xyz, R0, R2, R3;\n"
"MAD result.color.w, -R1, R0, R1.x;\n"
"END\n"
;
@@ -6687,12 +6681,11 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
+ "TEX R0.x, R0, texture[1], 2D;\n"
+ "ADD R1.x, -R0, c[5];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"MUL R2.xyz, R1.w, R0;\n"
"MAD R3.xyz, R1, R0.w, R2;\n"
"ADD R2.w, -R0, c[5].x;\n"
@@ -6720,7 +6713,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_HARDLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 2, 1 } };\n"
+ " { 1, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6732,38 +6725,38 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.y, -R0;\n"
- "TEX R1.x, R0, texture[1], 2D;\n"
- "MUL R1, fragment.color.primary, R1.x;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
- "ADD R2.w, -R0, c[5].y;\n"
+ "TEX R0.x, R0, texture[1], 2D;\n"
+ "ADD R0.x, -R0, c[5];\n"
+ "MUL R1, fragment.color.primary, R0.x;\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
+ "ADD R2.w, -R0, c[5].x;\n"
"ADD R3.xyz, R1.w, -R1;\n"
"ADD R2.xyz, R0.w, -R0;\n"
"MUL R2.xyz, R2, R3;\n"
- "MUL R2.xyz, R2, c[5].x;\n"
+ "MUL R2.xyz, R2, c[5].y;\n"
"MAD R2.xyz, R1.w, R0.w, -R2;\n"
+ "MAD R2.xyz, R1, R2.w, R2;\n"
"MUL R4.xyz, R1, R2.w;\n"
"MUL R3.xyz, R1, R0;\n"
- "MAD R2.xyz, R1, R2.w, R2;\n"
- "ADD R2.w, -R1, c[5].y;\n"
- "MUL R1.xyz, R1, c[5].x;\n"
- "MAD R2.xyz, R0, R2.w, R2;\n"
- "MAD R3.xyz, R3, c[5].x, R4;\n"
- "MAD R0.xyz, R0, R2.w, R3;\n"
- "ADD R2.w, R1, R0;\n"
- "ADD R2.xyz, R2, -R0;\n"
+ "MUL R1.xyz, R1, c[5].y;\n"
+ "ADD R2.w, -R1, c[5].x;\n"
+ "MAD R3.xyz, R3, c[5].y, R4;\n"
+ "MAD R3.xyz, R0, R2.w, R3;\n"
+ "MAD R0.xyz, R0, R2.w, R2;\n"
+ "ADD R2.x, R1.w, R0.w;\n"
+ "ADD R0.xyz, R0, -R3;\n"
"SGE R1.xyz, R1, R1.w;\n"
- "MAD result.color.xyz, R1, R2, R0;\n"
- "MAD result.color.w, -R1, R0, R2;\n"
+ "MAD result.color.xyz, R1, R0, R3;\n"
+ "MAD result.color.w, -R1, R0, R2.x;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_SOFTLIGHT_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[7] = { program.local[0..4],\n"
- " { 1, 9.9999997e-006, 2, 3 },\n"
- " { 8 } };\n"
+ " { 1, 2, 9.9999997e-006, 8 },\n"
+ " { 3 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6771,59 +6764,59 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"TEMP R4;\n"
"TEMP R5;\n"
"TEMP R6;\n"
- "MUL R0.xyz, fragment.position.y, c[2];\n"
- "MAD R0.xyz, fragment.position.x, c[1], R0;\n"
- "ADD R1.xyz, R0, c[3];\n"
- "RCP R0.z, R1.z;\n"
- "MUL R1.xy, R1, R0.z;\n"
- "MUL R1.xy, R1, c[0];\n"
- "MOV R1.y, -R1;\n"
"MUL R0.xy, fragment.position, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "MAX R1.z, R0.w, c[5].y;\n"
- "RCP R2.w, R1.z;\n"
+ "MAX R1.w, R0, c[5].z;\n"
+ "RCP R2.w, R1.w;\n"
"MUL R2.xyz, R0, R2.w;\n"
- "MUL R6.xyz, -R2, c[6].x;\n"
- "MAD R3.xyz, -R0, R2.w, c[5].x;\n"
+ "RSQ R1.w, R2.x;\n"
+ "MUL R5.xyz, -R2, c[5].w;\n"
+ "MUL R1.xyz, fragment.position.y, c[2];\n"
+ "MAD R1.xyz, fragment.position.x, c[1], R1;\n"
+ "ADD R1.xyz, R1, c[3];\n"
+ "RCP R1.z, R1.z;\n"
+ "MUL R1.xy, R1, R1.z;\n"
+ "MUL R1.xy, R1, c[0];\n"
"TEX R1.x, R1, texture[1], 2D;\n"
+ "RSQ R1.z, R2.y;\n"
+ "RSQ R1.y, R2.z;\n"
+ "MAD R2.xyz, -R0, R2.w, c[5].x;\n"
+ "RCP R3.x, R1.w;\n"
+ "RCP R3.y, R1.z;\n"
+ "RCP R3.z, R1.y;\n"
+ "ADD R1.x, -R1, c[5];\n"
"MUL R1, fragment.color.primary, R1.x;\n"
- "MAD R4.xyz, R1, c[5].z, -R1.w;\n"
- "MUL R5.xyz, R3, R4;\n"
- "MAD R3.xyz, -R3, R4, R1.w;\n"
- "ADD R6.xyz, R6, c[5].w;\n"
- "MAD R5.xyz, -R5, R6, R1.w;\n"
- "RSQ R2.x, R2.x;\n"
- "RSQ R2.z, R2.z;\n"
- "RSQ R2.y, R2.y;\n"
- "MUL R5.xyz, R0, R5;\n"
- "MUL R3.xyz, R0, R3;\n"
- "RCP R2.x, R2.x;\n"
- "RCP R2.z, R2.z;\n"
- "RCP R2.y, R2.y;\n"
- "MAD R2.xyz, R0.w, R2, -R0;\n"
- "MUL R2.xyz, R2, R4;\n"
- "MAD R2.xyz, R1.w, R0, R2;\n"
- "ADD R6.xyz, R2, -R5;\n"
- "MUL R4.xyz, R1, c[5].z;\n"
- "MUL R2.xyz, R0, c[6].x;\n"
- "SGE R2.xyz, R2, R0.w;\n"
- "MAD R2.xyz, R2, R6, R5;\n"
- "ADD R2.xyz, R2, -R3;\n"
- "SGE R4.xyz, R4, R1.w;\n"
- "MAD R2.xyz, R4, R2, R3;\n"
+ "MAD R4.xyz, R0.w, R3, -R0;\n"
+ "MAD R3.xyz, R1, c[5].y, -R1.w;\n"
+ "MUL R4.xyz, R3, R4;\n"
+ "ADD R6.xyz, R5, c[6].x;\n"
+ "MUL R5.xyz, R2, R3;\n"
+ "MAD R2.xyz, -R2, R3, R1.w;\n"
+ "MUL R3.xyz, R1, c[5].y;\n"
+ "MAD R6.xyz, -R5, R6, R1.w;\n"
+ "MAD R4.xyz, R1.w, R0, R4;\n"
+ "MAD R5.xyz, -R0, R6, R4;\n"
+ "MUL R4.xyz, R0, c[5].w;\n"
+ "MUL R6.xyz, R0, R6;\n"
+ "SGE R4.xyz, R4, R0.w;\n"
+ "MAD R4.xyz, R4, R5, R6;\n"
+ "MAD R4.xyz, -R0, R2, R4;\n"
+ "MUL R2.xyz, R0, R2;\n"
+ "SGE R3.xyz, R3, R1.w;\n"
+ "MAD R2.xyz, R3, R4, R2;\n"
"ADD R2.w, -R0, c[5].x;\n"
- "MAD R1.xyz, R1, R2.w, R2;\n"
- "ADD R2.x, R1.w, R0.w;\n"
- "ADD R2.y, -R1.w, c[5].x;\n"
- "MAD result.color.xyz, R0, R2.y, R1;\n"
- "MAD result.color.w, -R1, R0, R2.x;\n"
+ "MAD R2.xyz, R1, R2.w, R2;\n"
+ "ADD R1.x, R1.w, R0.w;\n"
+ "ADD R1.y, -R1.w, c[5].x;\n"
+ "MAD result.color.xyz, R0, R1.y, R2;\n"
+ "MAD result.color.w, -R1, R0, R1.x;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_DIFFERENCE_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 2 } };\n"
+ " { 1, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6834,18 +6827,17 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R0.x, R0, texture[1], 2D;\n"
+ "ADD R1.x, -R0, c[5];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R3.xyz, R1.w, R0;\n"
"MUL R2.xyz, R1, R0.w;\n"
"ADD R0.xyz, R1, R0;\n"
"MIN R2.xyz, R2, R3;\n"
"ADD R1.x, R1.w, R0.w;\n"
- "MAD result.color.xyz, -R2, c[5].x, R0;\n"
+ "MAD result.color.xyz, -R2, c[5].y, R0;\n"
"MAD result.color.w, -R1, R0, R1.x;\n"
"END\n"
;
@@ -6853,7 +6845,7 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODES_EXCLUSION_NOMASK =
"!!ARBfp1.0\n"
"PARAM c[6] = { program.local[0..4],\n"
- " { 2, 1 } };\n"
+ " { 1, 2 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"TEMP R2;\n"
@@ -6864,20 +6856,19 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.w, -R0.y;\n"
- "MOV R0.z, R0.x;\n"
- "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
- "MUL R0.xy, fragment.position, c[4];\n"
- "TEX R0, R0, texture[0], 2D;\n"
+ "TEX R0.x, R0, texture[1], 2D;\n"
+ "ADD R1.x, -R0, c[5];\n"
+ "MUL R0.zw, fragment.position.xyxy, c[4].xyxy;\n"
+ "TEX R0, R0.zwzw, texture[0], 2D;\n"
"MUL R1, fragment.color.primary, R1.x;\n"
"MUL R2.xyz, R1.w, R0;\n"
"MAD R3.xyz, R1, R0.w, R2;\n"
"MUL R2.xyz, R1, R0;\n"
- "MAD R2.xyz, -R2, c[5].x, R3;\n"
- "ADD R2.w, -R0, c[5].y;\n"
+ "MAD R2.xyz, -R2, c[5].y, R3;\n"
+ "ADD R2.w, -R0, c[5].x;\n"
"MAD R1.xyz, R1, R2.w, R2;\n"
"ADD R2.x, R1.w, R0.w;\n"
- "ADD R2.y, -R1.w, c[5];\n"
+ "ADD R2.y, -R1.w, c[5].x;\n"
"MAD result.color.xyz, R0, R2.y, R1;\n"
"MAD result.color.w, -R1, R0, R2.x;\n"
"END\n"
@@ -6885,29 +6876,31 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODE_BLEND_MODE_MASK =
"!!ARBfp1.0\n"
- "PARAM c[7] = { program.local[0..6] };\n"
+ "PARAM c[8] = { program.local[0..6],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"TEMP R1;\n"
"MUL R0.xyz, fragment.position.y, c[2];\n"
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
- "ADD R1.xyz, R0, c[3];\n"
- "RCP R0.z, R1.z;\n"
- "MUL R0.zw, R1.xyxy, R0.z;\n"
- "MUL R1.xy, R0.zwzw, c[0];\n"
- "MOV R1.y, -R1;\n"
+ "ADD R0.xyz, R0, c[3];\n"
+ "RCP R0.z, R0.z;\n"
+ "MUL R0.zw, R0.xyxy, R0.z;\n"
+ "MUL R0.zw, R0, c[0].xyxy;\n"
+ "TEX R1.x, R0.zwzw, texture[1], 2D;\n"
"ADD R0.xy, fragment.position, c[5];\n"
"MUL R0.xy, R0, c[4];\n"
"TEX R0, R0, texture[0], 2D;\n"
- "TEX R1.x, R1, texture[1], 2D;\n"
- "DP4 R0.x, R0, c[6];\n"
- "MUL R1, fragment.color.primary, R1.x;\n"
- "MUL result.color, R1, R0.x;\n"
+ "DP4 R1.y, R0, c[6];\n"
+ "ADD R1.x, -R1, c[7];\n"
+ "MUL R0, fragment.color.primary, R1.x;\n"
+ "MUL result.color, R0, R1.y;\n"
"END\n"
;
static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MODE_BLEND_MODE_NOMASK =
"!!ARBfp1.0\n"
- "PARAM c[4] = { program.local[0..3] };\n"
+ "PARAM c[5] = { program.local[0..3],\n"
+ " { 1 } };\n"
"TEMP R0;\n"
"MUL R0.xyz, fragment.position.y, c[2];\n"
"MAD R0.xyz, fragment.position.x, c[1], R0;\n"
@@ -6915,8 +6908,8 @@ static const char *FragmentProgram_FRAGMENT_PROGRAM_BRUSH_PATTERN_COMPOSITION_MO
"RCP R0.z, R0.z;\n"
"MUL R0.xy, R0, R0.z;\n"
"MUL R0.xy, R0, c[0];\n"
- "MOV R0.y, -R0;\n"
"TEX R0.x, R0, texture[0], 2D;\n"
+ "ADD R0.x, -R0, c[4];\n"
"MUL result.color, fragment.color.primary, R0.x;\n"
"END\n"
;
diff --git a/src/opengl/util/generator.cpp b/src/opengl/util/generator.cpp
index 62d19ff..0202fe1 100644
--- a/src/opengl/util/generator.cpp
+++ b/src/opengl/util/generator.cpp
@@ -54,6 +54,8 @@ QT_BEGIN_NAMESPACE
QT_USE_NAMESPACE
+#define TAB " "
+
typedef QPair<QString, QString> QStringPair;
QString readSourceFile(const QString &sourceFile, bool fragmentProgram = false)
@@ -243,6 +245,30 @@ QString trimmed(QString source)
return result;
}
+void writeVariablesEnum(QTextStream &out, const char *name, const QSet<QString> &s)
+{
+ out << "enum " << name << " {";
+ QSet<QString>::const_iterator it = s.begin();
+ if (it != s.end()) {
+ out << "\n" TAB "VAR_" << it->toUpper();
+ for (++it; it != s.end(); ++it)
+ out << ",\n" TAB "VAR_" << it->toUpper();
+ }
+ out << "\n};\n\n";
+}
+
+void writeTypesEnum(QTextStream &out, const char *name, const QList<QStringPair> &s)
+{
+ out << "enum " << name << " {";
+ QList<QStringPair>::const_iterator it = s.begin();
+ if (it != s.end()) {
+ out << "\n" TAB << it->first;
+ for (++it; it != s.end(); ++it)
+ out << ",\n" TAB << it->first;
+ }
+ out << "\n};\n\n";
+}
+
void writeIncludeFile(const QSet<QString> &variables,
const QList<QStringPair> &brushes,
const QList<QStringPair> &compositionModes,
@@ -257,7 +283,7 @@ void writeIncludeFile(const QSet<QString> &variables,
QTextStream out(&includeFile);
- QLatin1String tab(" ");
+ QLatin1String tab(TAB);
out << "/****************************************************************************\n"
"**\n"
@@ -265,7 +291,7 @@ void writeIncludeFile(const QSet<QString> &variables,
"** All rights reserved.\n"
"** Contact: Nokia Corporation (qt-info@nokia.com)\n"
"**\n"
- "** This file is part of the test suite of the Qt Toolkit.\n"
+ "** This file is part of the QtOpenGL module of the Qt Toolkit.\n"
"**\n"
"** $QT_BEGIN_LICENSE:LGPL$\n"
"** No Commercial Usage\n"
@@ -315,25 +341,10 @@ void writeIncludeFile(const QSet<QString> &variables,
"//\n"
"\n";
- out << "enum FragmentVariable {\n";
- foreach (QString str, variables)
- out << tab << "VAR_" << str.toUpper() << ",\n";
- out << "};\n\n";
-
- out << "enum FragmentBrushType {\n";
- foreach (QStringPair brush, brushes)
- out << tab << brush.first << ",\n";
- out << "};\n\n";
-
- out << "enum FragmentCompositionModeType {\n";
- foreach (QStringPair mode, compositionModes)
- out << tab << mode.first << ",\n";
- out << "};\n\n";
-
- out << "enum FragmentMaskType {\n";
- foreach (QStringPair mask, masks)
- out << tab << mask.first << ",\n";
- out << "};\n\n";
+ writeVariablesEnum(out, "FragmentVariable", variables);
+ writeTypesEnum(out, "FragmentBrushType", brushes);
+ writeTypesEnum(out, "FragmentCompositionModeType", compositionModes);
+ writeTypesEnum(out, "FragmentMaskType", masks);
out << "static const unsigned int num_fragment_variables = " << variables.size() << ";\n\n";
out << "static const unsigned int num_fragment_brushes = " << brushes.size() << ";\n";
diff --git a/src/opengl/util/masks.conf b/src/opengl/util/masks.conf
index 733ac81..d853d0b 100644
--- a/src/opengl/util/masks.conf
+++ b/src/opengl/util/masks.conf
@@ -1,3 +1,2 @@
FRAGMENT_PROGRAM_MASK_TRAPEZOID_AA trap_exact_aa.glsl
FRAGMENT_PROGRAM_MASK_ELLIPSE_AA ellipse_aa.glsl
-#FRAGMENT_PROGRAM_MASK_ELLIPSE ellipse.glsl
diff --git a/src/opengl/util/pattern_brush.glsl b/src/opengl/util/pattern_brush.glsl
index e070449..31702b8 100644
--- a/src/opengl/util/pattern_brush.glsl
+++ b/src/opengl/util/pattern_brush.glsl
@@ -17,9 +17,7 @@ vec4 brush()
coords *= inv_brush_texture_size;
- coords.y = -coords.y;
-
- float alpha = texture2D(brush_texture, coords).r;
+ float alpha = 1.0 - texture2D(brush_texture, coords).r;
return gl_Color * alpha;
}
diff --git a/src/opengl/util/simple_porter_duff.glsl b/src/opengl/util/simple_porter_duff.glsl
index 83aef48..4cb0599 100644
--- a/src/opengl/util/simple_porter_duff.glsl
+++ b/src/opengl/util/simple_porter_duff.glsl
@@ -7,10 +7,10 @@ vec4 composite(vec4 src, vec4 dst)
result.xyz = porterduff_ab.x * src.xyz * dst.a
+ porterduff_ab.y * dst.xyz * src.a
- + porterduff_xyz.y * src.xyz * (1 - dst.a)
- + porterduff_xyz.z * dst.xyz * (1 - src.a);
+ + porterduff_xyz.y * src.xyz * (1.0 - dst.a)
+ + porterduff_xyz.z * dst.xyz * (1.0 - src.a);
- result.a = dot(porterduff_xyz, vec3(src.a * dst.a, src.a * (1 - dst.a), dst.a * (1 - src.a)));
+ result.a = dot(porterduff_xyz, vec3(src.a * dst.a, src.a * (1.0 - dst.a), dst.a * (1.0 - src.a)));
return result;
}
diff --git a/src/opengl/util/trap_exact_aa.glsl b/src/opengl/util/trap_exact_aa.glsl
index b96f87d..1637f43 100644
--- a/src/opengl/util/trap_exact_aa.glsl
+++ b/src/opengl/util/trap_exact_aa.glsl
@@ -14,7 +14,7 @@ float quad_aa()
vec2 invA = gl_TexCoord[0].zw;
// transform right line to left to be able to use same calculations for both
- vecX.zw = 2 * gl_FragCoord.x - vecX.zw;
+ vecX.zw = 2.0 * gl_FragCoord.x - vecX.zw;
vec2 topX = vec2(vecX.x, vecX.z);
vec2 bottomX = vec2(vecX.y, vecX.w);
@@ -33,18 +33,18 @@ float quad_aa()
vec2 temp = mix(area - 0.5 * (right - bottomXTemp) * (intersectY.yw - bottom), // left < bottom < right < top
(0.5 * (topXTemp + bottomXTemp) - left) * area, // left < bottom < top < right
- step(topXTemp, right));
+ step(topXTemp, right.xx));
vec2 excluded = 0.5 * (top - intersectY.xz) * (topXTemp - left); // bottom < left < top < right
excluded = mix((top - 0.5 * (intersectY.yw + intersectY.xz)) * (right - left), // bottom < left < right < top
- excluded, step(topXTemp, right));
+ excluded, step(topXTemp, right.xx));
excluded = mix(temp, // left < bottom < right (see calculation of temp)
- excluded, step(bottomXTemp, left));
+ excluded, step(bottomXTemp, left.xx));
excluded = mix(vec2(area, area), // right < bottom < top
- excluded, step(bottomXTemp, right));
+ excluded, step(bottomXTemp, right.xx));
excluded *= step(left, topXTemp);
@@ -53,6 +53,6 @@ float quad_aa()
void main()
{
- gl_FragColor = quad_aa();
+ gl_FragColor = quad_aa().xxxx;
}
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 2003f3b..f86e116 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -101,6 +101,11 @@ QVGPixmapData::~QVGPixmapData()
#endif
}
+QPixmapData *QVGPixmapData::createCompatiblePixmapData() const
+{
+ return new QVGPixmapData(pixelType());
+}
+
bool QVGPixmapData::isValid() const
{
return (w > 0 && h > 0);
diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h
index 99115df..f552c7b 100644
--- a/src/openvg/qpixmapdata_vg_p.h
+++ b/src/openvg/qpixmapdata_vg_p.h
@@ -72,6 +72,8 @@ public:
QVGPixmapData(PixelType type);
~QVGPixmapData();
+ QPixmapData *createCompatiblePixmapData() const;
+
// Is this pixmap valid (i.e. non-zero in size)?
bool isValid() const;
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index e4f267d..8ed83cb 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -238,6 +238,8 @@ private slots:
void taskQT4444_dontOverflowDashOffset();
+ void painterBegin();
+
private:
void fillData();
QColor baseColor( int k, int intensity=255 );
@@ -4312,5 +4314,43 @@ void tst_QPainter::taskQT4444_dontOverflowDashOffset()
QVERIFY(true); // Don't crash
}
+void tst_QPainter::painterBegin()
+{
+ QImage nullImage;
+ QImage indexed8Image(16, 16, QImage::Format_Indexed8);
+ QImage rgb32Image(16, 16, QImage::Format_RGB32);
+ QImage argb32Image(16, 16, QImage::Format_ARGB32_Premultiplied);
+
+ QPainter p;
+
+ // Painting on null image should fail.
+ QVERIFY(!p.begin(&nullImage));
+
+ // Check that the painter is not messed up by using it on another image.
+ QVERIFY(p.begin(&rgb32Image));
+ QVERIFY(p.end());
+
+ // If painting on indexed8 image fails, the painter state should still be OK.
+ if (p.begin(&indexed8Image))
+ QVERIFY(p.end());
+ QVERIFY(p.begin(&rgb32Image));
+ QVERIFY(p.end());
+
+ // Try opening a painter on the two different images.
+ QVERIFY(p.begin(&rgb32Image));
+ QVERIFY(!p.begin(&argb32Image));
+ QVERIFY(p.end());
+
+ // Try opening two painters on the same image.
+ QVERIFY(p.begin(&rgb32Image));
+ QPainter q;
+ QVERIFY(!q.begin(&rgb32Image));
+ QVERIFY(!q.end());
+ QVERIFY(p.end());
+
+ // Try ending an inactive painter.
+ QVERIFY(!p.end());
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"