History log of /external/mesa3d/src/mesa/drivers/common/meta.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
794c133dfb954268fe8ee5989af81d891901de08 05-Dec-2012 Stefan Dösinger <stefandoesinger@gmx.at> meta: Disable GL_FRAGMENT_SHADER_ATI in MESA_META_SHADER

Fixes clears in Wine on r200.

NOTE: This is a candidate for stable release branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d8069b7603c368c59e7a605d696d2bd65ad414f6)

Port to 9.0: Andreas Boll <andreas.boll.dev@gmail.com>
s/API_OPENGL_COMPAT/API_OPENGL/
/external/mesa3d/src/mesa/drivers/common/meta.c
b086d9ced7d3ab07afa008aea0253c75e827f392 16-Nov-2012 Anuj Phogat <anuj.phogat@gmail.com> mesa: Fix GL_LUMINANCE handling for textures in glGetTexImage

We need to rebase colors (ex: set G=B=0) when getting GL_LUMINANCE
textures in following cases:
1. If the luminance texture is actually stored as rgba
2. If getting a luminance texture, but returning rgba
3. If getting an rgba texture, but returning luminance

A similar fix was pushed by Brian Paul for uncompressed textures
in commit: f5d0ced.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47220

Observed no regressions in piglit and ogles2conform due to this fix.
This patch will cause failures in intel oglconform pxconv-gettex,
pxstore-gettex and pxtrans-gettex test cases. The cause of failures
is a bug in test cases. Expected luminance value is calculted
incorrectly in test cases: L = R+G+B.

V2: Set G = 0 when getting a RG texture but returning luminance.

Note: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
(cherry picked from commit 9ab896243cfdee7f6a626aceb26e4cb88bd4da2d)
/external/mesa3d/src/mesa/drivers/common/meta.c
c4263ac0baa37ee7cff9e36f973afab5fda433d4 02-Nov-2012 Anuj Phogat <anuj.phogat@gmail.com> meta: Remove redundant code in _mesa_meta_GenerateMipmap

Integer textures generate invalid operation in glGenerateMipmap.
So, the code related to integer textures is now redundant.

Note: This is a candidate for stable branches.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit a196f43596f6cb85a8f3e446596a2fb8e0ee7872)
/external/mesa3d/src/mesa/drivers/common/meta.c
ad4b3b93ded960c22388c7bc3ba14d32b30b8f1d 31-Aug-2012 Anuj Phogat <anuj.phogat@gmail.com> _mesa_meta_GenerateMipmap: Support all texture targets by generating shaders at runtime

This is a squash for the following 7 commits. The first introduces the
functionality, and the remaining six fix various bugs.

Patch 1:
_mesa_meta_GenerateMipmap: Support all texture targets by generating shaders at runtime

glsl path of _mesa_meta_GenerateMipmap() function would require different fragment
shaders depending on the texture target. This patch adds the code to generate
appropriate fragment shader programs at run time.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=54296

V2: Removed the code for integer textures as ARB is planning to
disallow automatic mipmap generation for integer textures.
Now using ralloc_asprintf in setup_glsl_generate_mipmap().

NOTE: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 299acac849eb8506de9760c94c6e8e8b1046d909)

Patch 2:
_mesa_meta_GenerateMipmap: Generate separate shaders for glsl 120 / 130

glsl version of _mesa_meta_GenerateMipmap() would require separate
shaders for glsl 120 and 130.

V2: Removed the code for integer textures as ARB is planning to
disallow automatic mipmap generation for integer textures.

NOTE: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 15bf3103b48a5928321fe56fbb3ed28a0f314418)

Patch 3:
meta: Add on demand compilation of per target shader programs

A call to glGenerateMipmap() follows the generation of a relevant
shader program in setup_glsl_generate_mipmap().

To support all texture targets and to avoid compiling shaders
everytime, per target shader programs are compiled on demand
and saved for the next call.

Fixes float-texture(mipmap.manual):
See Comment 6: https://bugs.freedesktop.org/show_bug.cgi?id=54296

NOTE: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit eb1d87fb945783448cc40ad43c9cd4d98002d424)

Patch 4:
meta: make mem_ctx non-global.

I can't see any external users, and this is a global symbol,

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 36639ec6e9a2758e344235fbdc1450719d8851e3)

Patch 5:
meta: Remove unsafe global mem_ctx pointer

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit ab097dde0c958dd8b1c06a07ef8913512753760c)

Patch 6:
meta: Rearrange shader creation in setup_glsl_generate_mipmap

The diff looks weird, but this moves the code from the first 'if
(ctx->Const.GLSLVersion < 130)' block down into the second block. It
also moves some variable decalarations closer to their use.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 3308c079bd00e9b9aa546f5214ce197a904d059b)

Patch 7:
meta: Don't use GLSL 1.30 shader on OpenGL ES 2

Fixes GLES2 CoverageGL conformance test.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 0242381f06edb09dcf0eaacd6d26ccd8584700cc)
/external/mesa3d/src/mesa/drivers/common/meta.c
549129838ca5f80152c83474276b65f89b0f8013 16-Sep-2012 Kenneth Graunke <kenneth@whitecape.org> meta: Use float for temporary images, not (un)signed normalized.

In commit 091eb15b694, Jordan changed get_temp_image_type() to use
_mesa_get_format_datatype() instead of returning GL_FLOAT. That has
several possible return values: GL_FLOAT, GL_INT, GL_UNSIGNED_INT,
GL_SIGNED_NORMALIZED, and GL_UNSIGNED_NORMALIZED.

We do want to use GL_INT/GL_UNSIGNED_INT for integer formats. However,
we want to continue using GL_FLOAT for the normalized fixed-point types.
There isn't any code in pack.c to handle GL_(UN)SIGNED_NORMALIZED.

Fixes oglconform's fboarb advanced.blit.copypix, which was regressed by
commit 091eb15b694a396f8453093575ccec2db7f14eb8.

NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53573
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 3767b25bd3f77cede452cfbe9b66a51b352d9036)
/external/mesa3d/src/mesa/drivers/common/meta.c
fdabc7d9f6db82d0c8dbca09c30cf25be29b30d8 14-Sep-2012 Kenneth Graunke <kenneth@whitecape.org> meta: Don't _mesa_set_enable() invalid targets in ES 1.

GL_TEXTURE_1D, GL_TEXTURE_3D, GL_TEXTURE_RECTANGLE, and
GL_TEXTURE_GEN_S/T/R/Q don't exist in ES 1 contexts, so any meta ops
that used _mesa_meta_begin with MESA_META_TEXTURE would trigger GL
errors. One such operation is _mesa_meta_Clear().

On ES 1, we want to disable GL_TEXTURE_GEN_STR_OES instead.

Fixes the ES1 conformance test miplin.c, which was regressed by commit
08be1d288f216232d3974f5997b266a8dd720928.

NOTE: This is a candidate for the 9.0 branch.

v2: Also blacklist GL_TEXTURE_3D, per Brian's comment.
v3: Disable GL_TEXTURE_GEN_STR_OES, per Ian's comment.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54297
Reviewed-by: Brian Paul <brianp@vmware.com> [v1]
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 679c93ff89c71cbd3b1d24e88abd38f00b8c1f02)
/external/mesa3d/src/mesa/drivers/common/meta.c
0231c54ebbfd4ace99c3be6bb6e5c76127279aca 14-Sep-2012 Kenneth Graunke <kenneth@whitecape.org> meta: Don't _mesa_set_enable() invalid targets in ES 1.

GL_TEXTURE_1D, GL_TEXTURE_3D, GL_TEXTURE_RECTANGLE, and GL_TEXTURE_GEN_*
don't exist in ES 1 contexts, so any meta ops that used _mesa_meta_begin
with MESA_META_TEXTURE would trigger GL errors. One such operation is
_mesa_meta_Clear().

Fixes the ES1 conformance test miplin.c, which was regressed by commit
08be1d288f216232d3974f5997b266a8dd720928.

NOTE: This is a candidate for the 9.0 branch.

v2: Also blacklist GL_TEXTURE_3D, per Brian's comments.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54297
Cc: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
284fe97515998178962b5abb4ed0b828b3497c77 01-Sep-2012 Ian Romanick <ian.d.romanick@intel.com> meta: Don't save and restore fog state when there is no fog state

I wonder if the better solution is to have _mesa_meta_GenerateMipmap not
use MESA_META_ALL for the GLSL path. Even on compatibility profiles
there is no reason to save and restore fog on this path.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Lu Hua <huax.lu@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54295
(cherry picked from commit 51b069e7aa81cdc8f38db71554ae3dd12ce0a6c4)
/external/mesa3d/src/mesa/drivers/common/meta.c
055093e33fc90705c429e948caefedf0e0fb82af 30-Aug-2012 Brian Paul <brianp@vmware.com> meta: remove call to _meta_in_progress(), fix multisample enable/disable

This partially reverts d638da23d2ec2e9c52655b1ea138249e7f8bcccb.

With gallium the meta code is not always built so the call to
_meta_in_progress() was unresolved. Simply special-case the
GL_MULTISAMPLE case in the meta code. There might be other special
cases in the future given all the differences between legacy GL,
core GL, GLES, etc.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=54234
and https://bugs.freedesktop.org/show_bug.cgi?id=54239

v2 (Paul Berry <stereotype441@gmail.com>): keep _meta_in_progress
function, since it's needed by the i965 driver, but don't call it from
core mesa.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
aad7ccd261e67e9d943dcab17ebe8082d7b6f4d9 30-Aug-2012 Brian Paul <brianp@vmware.com> meta: add parenthesis to silence compiler warnings

Reviewed-by: Paul Berry <stereotype441@gmail.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
d1cf5c77b73d6b2c1cfd79ce0e3363e097177b6a 18-Aug-2012 Ian Romanick <ian.d.romanick@intel.com> meta: Don't use deprecated keyword in 1.30 shader

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
7e1cab09a155a0f986342323624f460340de355f 18-Aug-2012 Ian Romanick <ian.d.romanick@intel.com> mesa: Only FRONT_AND_BACK is allowed for PolygonMode in core context

Page 407 (page 423 of the PDF) of the OpenGL 3.0 spec says (in the list
of deprecated functionality):

"Separate polygon draw mode - PolygonMode face values of FRONT and
BACK; polygons are always drawn in the same mode, no matter which
face is being rasterized."

Also modify meta to not use FRONT or BACK in a core context.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
d638da23d2ec2e9c52655b1ea138249e7f8bcccb 08-Aug-2012 Paul Berry <stereotype441@gmail.com> meta: Don't stray outside the confines of the API specified in the context

Signed-off-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
0fc11a24c85413a335b87bc34659d2381fd6670c 29-Aug-2012 Anuj Phogat <anuj.phogat@gmail.com> meta: Add GLSL variant of _mesa_meta_GenerateMipmap() function

This reduces the overhead of using the fixed function internally
in the driver.

V2: Use setup_glsl_generate_mipmap() and setup_ff_generate_mipmap()
functions to avoid code duplication.
Use glsl version when ARB_{vertex, fragmet}_shader are present.
Remove redundant code.

V3: Remove redundant border related code leaving the assertion.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
2abf555496b8f5a7319542756508dd2f2e8ed07c 23-Aug-2012 Ian Romanick <ian.d.romanick@intel.com> meta: Don't modify GL_GENERATE_MIPMAP state when it doesn't exist

This is a bit of a hack. _mesa_meta_GenerateMipmap shouldn't even be
used in contexts where GL_GENERATE_MIPMAP doesn't exist (i.e., core
profile and ES2) because it uses fixed-function, and fixed-function
doesn't exist there either!

A GLSL-based _mesa_meta_GenerateMipmap should be available soon. When
that is available, this patch will be irrelevant and should be reverted.

v2: Change (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) to
(ctx->API == API_OPENGL || ctx->API == API_OPENGLES) based on review
comment from Brian Paul.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
658044cde1dbdd6d58ad61ef44850da7afa5c413 16-Aug-2012 Brian Paul <brianp@vmware.com> meta: remove unused variable
/external/mesa3d/src/mesa/drivers/common/meta.c
091eb15b694a396f8453093575ccec2db7f14eb8 21-Jun-2012 Jordan Justen <jordan.l.justen@intel.com> meta: allow CopyTexSubImage on integer formats

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
bf6c1b74705243efdd43f07d381768fceede1f91 12-Jun-2012 Pauli Nieminen <pauli.nieminen@linux.intel.com> meta: texture rectangle textures may not have mipmaps

Avoid INVALID_OPERATION error if decompressing rectangle texture.
Setting mipmap level limits for those textures is error that must not be
hit by meta code to mislead user.

[v3/Kayden]: Resolve conflicts due to Eric picking a subset of Pauli's
original changes.

Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
b9daa834633f0e012a35f67cf232464e5cb3b9b6 12-Jun-2012 Pauli Nieminen <pauli.nieminen@linux.intel.com> meta: Use sampler object for mipmap generation

Sampler objects are perfect for meta operations.Sampler object
is separate state object that shadows the sampling state in texture
object. With sampler object mipmap can maintain same sampling state for
all subsequent generation requests.

Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
204bfb904bd5d4dd9ce90fe4d3e8e48b0d01fdae 12-Jun-2012 Pauli Nieminen <pauli.nieminen@linux.intel.com> meta: Use sampler object in framebuffer blit

Framebuffer blit needs to setup texture sampling with no reference to the
user's texturing state, and a sampler object lets us avoid a bunch of changes
to the user's state setup.

We don't bother caching the sampler object since we're changing parameters in
it based on the filtering option to glBlitFramebuffer().

Fixes piglit GL_ARB_sampler_objects/framebufferblit and rendering in l4d2 (our
setting of srgb decode wasn't being respected due to the user's sampler object
being active).

Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/common/meta.c
676a563d5bdcd9c75e1e33d75e2fa16bedcf5e83 12-Jun-2012 Pauli Nieminen <pauli.nieminen@linux.intel.com> meta: Add sampler object to texture decompression

Sampler objects can be used to shadow texture object state without
modifying original application state. Decompression path feels a bit
like path where caching shouldn't happen. But as everything else is
cached already I decided to cache sampler state too.

Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/common/meta.c
0f099df5672a68cf165f550278831356c903515f 24-Jul-2012 Jordan Justen <jordan.l.justen@intel.com> meta: add support for using API_OPENGL_CORE

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
906febaf8bd37fffa4fc14c56eda1dd6e4b4dcda 27-Jul-2012 Brian Paul <brianp@vmware.com> meta: fix glDrawPixels fallback test, stencil drawing

Remove the check for pixel transfer ops. If any RGB/depth scale/bias
is in effect, it'll be applied in the glTexImage step.

If drawing stencil pixels we need to disable pixel transfer so that
alpha scale/bias are not applied to the stencil data.

These issues were spotted by Roland.

Fixes Blender performance issues reported in
http://bugs.freedesktop.org/show_bug.cgi?id=47375

NOTE: This is a candidate for the 8.0 branch.

Tested-by: Barto <mister.freeman@laposte.net>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
8b762ebd72c1bb1a9827a667ad55ba9516505adf 22-Jul-2012 Brian Paul <brianp@vmware.com> mesa: move some format helper functions to glformats.c
/external/mesa3d/src/mesa/drivers/common/meta.c
f34764ea5308221dc35479bd118142a0e249049c 28-Jun-2012 Paul Berry <stereotype441@gmail.com> msaa: Make meta-ops save and restore state of GL_MULTISAMPLE.

The meta-ops _mesa_meta_Clear() and _mesa_meta_glsl_Clear() need to
ignore the state of GL_SAMPLE_ALPHA_TO_COVERAGE,
GL_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_COVERAGE, GL_SAMPLE_COVERAGE_VALUE,
and GL_SAMPLE_COVERAGE_INVERT when clearing multisampled buffers. The
easiest way to accomplish this is to disable GL_MULTISAMPLE during the
clear meta-ops.

Note: this patch also causes GL_MULTISAMPLE to be disabled during
_mesa_meta_GenerateMipmap() and _mesa_meta_GetTexImage() (since those
two meta-ops use MESA_META_ALL). Arguably this isn't strictly
necessary, since those meta-ops use their own non-MSAA fbo's, but it
shouldn't do any harm.

Fixes Piglit tests "EXT_framebuffer_multisample/clear {2,4}
{color,stencil}" on i965.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
d73f6375f50be6a76991e240222a8e25906bfe4b 09-Jun-2012 Kenneth Graunke <kenneth@whitecape.org> meta: Don't alter fragment color clamp in DrawPixels().

DrawPixels uses the MESA_META_CLAMP_FRAGMENT_COLOR flag to save/restore
the fragment color clamp mode. This is unnecessary since it never
alters it. It's also harmful: when the clamp mode is GL_FIXED_ONLY,
setting this flag causes _mesa_meta_begin to force it to GL_FALSE,
breaking clamping on SNORM formats.

DrawPixels should use the user-specified clamp mode and not change it.

Fixes Piglit's spec/ARB_color_buffer_float/GL_RGBA8_SNORM-drawpixels
test on i965/Sandybridge (with SNORM render targets re-enabled).

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
53feb8ecdc74502c940a749b9ce89e68625c69a5 25-May-2012 Antoine Labour <piman@chromium.org> meta: Cleanup the resources we allocate.

When we have multiple shared contexts, and one of them is
long-running, this will lead to never freeing those resources
since they are shared. Instead, free them right away on context
destruction since we know the other context isn't using them.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

NOTE: This is a candidate for the 8.0 branch.
/external/mesa3d/src/mesa/drivers/common/meta.c
cd9ab2584f5e2a5eb0e96a948e6aedc9a33c886d 06-Jun-2012 Brian Paul <brianp@vmware.com> mesa: consolidate internal glCopyTexSubImage1/2/3D code

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
e42d00b3f4503a0840575c8e5f4517a66c8af613 06-Jun-2012 Brian Paul <brianp@vmware.com> mesa: consolidate internal glTexSubImage1/2/3D code

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
7fde071f04afff86d4f8d7895073e22e60970b4e 04-Jun-2012 Kenneth Graunke <kenneth@whitecape.org> meta: Fix GL_RENDERBUFFER binding in decompress_texture_image().

This isn't saved/restored by _mesa_meta_begin, so we need to do it
manually (like we do for the read/draw framebuffers). Additionally,
we neglected to re-bind before the glRenderbufferStorage call.

+13 oglconforms.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
ff3eef1affd0d3b56d4ce689947947be97c5d0f6 26-May-2012 Oliver McFadden <oliver.mcfadden@linux.intel.com> mesa: don't compile integer clear shaders for unsupported APIs

Discovered while running the Khronos conformance test suite and
receiving "implementation error: meta program compile failed."

This bug was recently introduced by the i965 clear patch set and would
only be detected while using the ES2 API and only on gen6+ hardware.

Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
3ff04ea236d3ef53fe765ecee92a805357b7373e 29-Feb-2012 Benjamin Franzke <benjaminfranzke@googlemail.com> meta: Fix compilation without FEATURE_EXT_transform_feedback

That is when building with --disable-opengl.
Fix for commit cb045880b113b0042d8dfb7e4cdf76e6cc76c1d1.

CC: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
84f107d287e5ed5ca83263f1edbad532a067fc29 29-Feb-2012 Benjamin Franzke <benjaminfranzke@googlemail.com> meta: Fix compilation without FEATURE_feedback

That is when building with --disable-opengl.
Fix for commit c5f4024a793f1209b1693aed9a46be9374ba4741.

CC: Chad Versace <chad@chad-versace.us>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
66bf25f1a2cc8343640cdfc4242d882bc00b9e3b 13-Feb-2012 Anuj Phogat <anuj.phogat@gmail.com> meta: Avoid FBO resizing/reallocating in decompress_texture_image

Reallocate/resize decompress FBO only if texture image width/height is
greater than existing decompress FBO width/height.

This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
40427025916e003cfd380c2e30df78ad2bc8fe10 11-Feb-2012 Anuj Phogat <anuj.phogat@gmail.com> meta: Add pixel store/pack operations in decompress_texture_image

This patch adds the pixel store operations in decompress_texture_image().
decompress_texture_image() is used in glGetTexImage() for compressed
textures with unsigned, normalized values.

It also fixes the failures in intel oglconform pxstore-gettex due to
following sub test cases:

- Test all mipmaps with byte swapping enabled
- Test all small mipmaps with all allowable alignment values
- Test subimage packing for all mipmap levels

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40864

Note: This is a candidate for stable branches

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
4dacf793c8bf5c18f66efeb04e9d8a7e037e7378 09-Feb-2012 Brian Paul <brianp@vmware.com> meta: replace abort() with _mesa_problem()

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
6bf0f6ae86dae14ed0348e5fccf75c43302ad502 20-Jan-2012 Eric Anholt <eric@anholt.net> meta: Detect currently-unsupported integer CopyTexSubImage and complain.

This code is unprepared for handling integer (particularly, the
baseFormat of the TexFormat comes out as GL_RGBA, not GL_RGBA_INTEGER,
so the direct call of Driver.ReadPixels crashes due to the int vs
non-int error checking not having happened). I'm frankly tempted to
convert this code to MapRenderbuffer/MapTexImage rather than doing it
as meta ops, now that we have that support.

Improves the remaining crash in Intel oglconform for int-textures to
just a rendering failure.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
b48d4b64e97f48dcf0aef1b6f7bc333c309cc183 21-Jan-2012 Ian Romanick <ian.d.romanick@intel.com> meta: Fallback for glBlitFramebuffer from a multisample surface

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44818
/external/mesa3d/src/mesa/drivers/common/meta.c
f83756f80f509fc51030853f8aa0fef3309fe886 10-Jan-2012 Eric Anholt <eric@anholt.net> meta: Add GL_RED/GL_RG support to meta CopyTexImage.

Fixes some _mesa_problem()s in oglconform.

Reviewed-by: Brian Paul <brianp@vmware.com>
NOTE: This is a candidate for the 8.0 branch.
/external/mesa3d/src/mesa/drivers/common/meta.c
2f0fa456e31a7030c911a563b62c84d448b09800 12-Jan-2012 Brian Paul <brianp@vmware.com> meta: fix incorrect argument order in setup_texture_coords() call

And pass integer width, height values.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
56b57aa360a8bad0c4b68fbdf7c64ac33f9e7661 29-Dec-2011 Brian Paul <brianp@vmware.com> mesa: rework ctx->Driver.CopyTexSubImage() parameters

Replace target, level parameters with gl_texture_image.
Add gl_renderbuffer parameter to indicate source buffer for the copy.

This removes some redundant code in the drivers to find the source
renderbuffer and the destination texture image (which we already had
in _mesa_CopyTexSubImage).

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
5fc6db6708048166743a2d9aa62083c040effa8a 07-Jan-2012 Brian Paul <brianp@vmware.com> meta: add some 'f' suffixes to silence MSVC warnings
/external/mesa3d/src/mesa/drivers/common/meta.c
da0cc82a093eb97212e989648da638a262ed3e84 30-Dec-2011 Brian Paul <brianp@vmware.com> mesa: simplify Driver.TexSubImage() parameters

There's no need to pass the target, level and texObj parameters since
they can be easily obtained from the texImage pointer.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/common/meta.c
7e5ffd9be2da66c076e84ae4bc854cca5665620c 22-Dec-2011 Chad Versace <chad.versace@linux.intel.com> meta: Disable GL_TEXTURE_EXTERNAL_OES in meta_begin()

If the meta flag MESA_META_TEXTURE is present, then disable the texture
target GL_TEXTURE_EXTERNAL_OES.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
cb045880b113b0042d8dfb7e4cdf76e6cc76c1d1 21-Dec-2011 Paul Berry <stereotype441@gmail.com> mesa: Pause transform feedback during meta ops.

Fixes piglit tests "EXT_transform_feedback/generatemipmap buffer" and
"EXT_transform_feedback/generatemipmap prims_written" on i965 Gen6.

Reviewed-by: Brian Paul <brianp@vmare.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
a3a4d01e415404e1bab76d440466952f4ab6171b 21-Dec-2011 Paul Berry <stereotype441@gmail.com> mesa: Save and restore GL_RASTERIZER_DISCARD state during meta ops.

During meta-operations (such as _mesa_meta_GenerateMipmap()), we need
to be able to draw even if GL_RASTERIZER_DISCARD is enabled. This
patch causes _mesa_meta_begin() to save the state of
GL_RASTERIZER_DISCARD and disable it (so that drawing can be done
during the meta-op), and causes _mesa_meta_end() to restore it.

Fixes piglit test "EXT_transform_feedback/generatemipmap discard" on
i965 Gen6.

Reviewed-by: Brian Paul <brianp@vmare.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
163611d7b21670de6074c09d37bdf93bad494036 19-Dec-2011 Paul Berry <stereotype441@gmail.com> mesa: Add a function to query whether a meta-op is in progress.

This is needed by i965 to ensure that transform feedback counters are
not incremented during meta-ops.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
cf79e2250927eb82559079a4a5d2bb7eab0fa5c5 15-Dec-2011 Brian Paul <brianp@vmware.com> meta: use _mesa_prepare_mipmap_level() in the mipmap generation code

See previous commit for more information.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/common/meta.c
196c6d4adfd6cee13782dc558b855c27a15e567c 10-Nov-2011 Eric Anholt <eric@anholt.net> meta: Fix restoring of fixed function texture enables.

If they were disabled on entry, and we enabled one (like for
BlitFramebuffer), we wouldn't disable it on the way out. Retain the
attempted optimization here (don't keep calling to set each bit for
changes that won't matter) by just setting the bits directly with
appropriate flushing.

Fixes misrendering on the second draw of piglit fbo-blit.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
95a826bed385efe6f53d3e1c0305b05ef355d786 10-Nov-2011 Eric Anholt <eric@anholt.net> meta: Don't forget to flag state when restoring texobjects.

It's unlikely that we changed the object but no other texture
parameter, but be correct anyway. Noticed by inspection.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
84277cb7d325cdeade8ce75eb4154adb744626dc 02-Nov-2011 Eric Anholt <eric@anholt.net> meta: Add support for glClear() to integer color buffers.

This requires using a new fragment shader to get the integer color
output, and a new vertex shader because #version has to match between
the two.

v2: Clarify that there's no need for BindFragDataLocation.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
/external/mesa3d/src/mesa/drivers/common/meta.c
b4dc35d9bc879c104faac043b640ae2673763b93 21-Aug-2011 Chia-I Wu <olv@lunarg.com> meta: add _mesa_meta_DrawTex()

It is set to dd->DrawTex.

Reviewed-by: Brian Paul <brianp@vmware.com>

[olv: set dd->DrawTex in _mesa_init_driver_functions]
/external/mesa3d/src/mesa/drivers/common/meta.c
aa97ababfcd5ae4d4433bd5f672836f40f6595f2 28-Sep-2011 Chad Versace <chad@chad-versace.us> meta: Bump MAX_META_OPS_DEPTH from 2 to 8

When i965 uses (in the near future) meta-ops to perform buffer resolves,
the meta-op stack exceeds depth 2. I bumped it to 8 because... 8 is bigger
than 2, but not too big.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/mesa/drivers/common/meta.c
c5f4024a793f1209b1693aed9a46be9374ba4741 08-Oct-2011 Chad Versace <chad@chad-versace.us> meta: Add flag MESA_META_SELECT_FEEDBACK

If this flag is set, then _mesa_meta_begin/end will save/restore the state of
GL_SELECT and GL_FEEDBACK render modes.

Intel's future buffer resolve meta-ops will require this, since buffer resolves
may occur when the GL_RENDER_MODE is GL_SELECT.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/mesa/drivers/common/meta.c
5625f78cd7e69aa90495d34088a47aa71d076fd2 18-Oct-2011 Neil Roberts <neil@linux.intel.com> meta: Fix saving the active program

When saving the active program in _mesa_meta_begin, it was actually
saving the fragment program instead. This means that if the
application binds a program that only has a vertex shader then when
the meta saved state is restored it will forget the bound program.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41969
Reviewed-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/mesa/drivers/common/meta.c
6fc6d5a09e36c56f4debd17bbbed15f732403619 14-Oct-2011 Brian Paul <brianp@vmware.com> meta: fix redBits size test in get_temp_image_type()

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41768
/external/mesa3d/src/mesa/drivers/common/meta.c
300a4cd9f2fc99af8039d31d19d44582cd82c2e7 03-Oct-2011 Kenneth Graunke <kenneth@whitecape.org> meta: Don't enable TEXTURE_RECTANGLE when it's unsupported.

In particular, drivers don't enable this in ES 1.1 contexts.

Prior to this, none of the OpenGL ES 1.1 conformance tests passed.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
a8ca786ba69f6af0120a24f473b2ae7e6a41495d 30-Sep-2011 Brian Paul <brianp@vmware.com> meta: fix GetTexImage() for luminance, l/a, intensity formats

The GL spec says that luminance values are returned as (l, 0, 0, 1),
L/A values as (l, 0, 0, a) and intensity values as (i, 0, 0, 1).
Use the pixel transfer scale controls to implement that.
This fixes a few failures in the new piglit getteximage-formats
test when getting a compressed L or L/A image.
/external/mesa3d/src/mesa/drivers/common/meta.c
4368a657670f1f3f13d8497f749cb5439f91529e 30-Sep-2011 Brian Paul <brianp@vmware.com> mesa: simplify parameters to GetTexImage() driver hook

The target, level and texObj can be obtained through the texImage
parameter. We could make similar changes for the TexImage() hooks too.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/common/meta.c
a140c3e7837725bfa610c9f842a95201b661c773 21-Sep-2011 Eric Anholt <eric@anholt.net> meta: Don't hang on to program refcounts after metaops are done.

Fixes piglit ARB_shader_objects/clear-with-deleted.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39577
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
de740d7b0aa39419c625cb3640e272c85b58a8a2 20-Sep-2011 Brian Paul <brianp@vmware.com> meta: use _mesa_set_enable() in more places

Avoids an extra context lookup.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/common/meta.c
9e414865a6716f688c7bce904d841f9ba16cd967 20-Sep-2011 Brian Paul <brianp@vmware.com> meta: use _mesa_set_enable(), fix decompress_texture_image()

Use _mesa_set_enable() to avoid a redudant context lookup.
Need to disable the texture target in decompress_texture_image() so the
unit isn't still enabled after glGetTexImage() returns. Arguably, the
meta restore code should do this, but it doesn't.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/common/meta.c
1e939f53749781312b1b3b729e2d73493ae6b304 17-Sep-2011 Brian Paul <brianp@vmware.com> meta: fix broken sRGB mipmap generation

If we're generating a mipmap for an sRGB texture we need to bypass
sRGB->linear conversion. Otherwise the destination mipmap level
(drawn with a textured quad) will have the wrong colors.
If we can't turn of sRGB->linear conversion (GL_EXT_texture_sRGB_decode)
we need to use the software fallback for mipmap generation.

Note: This is a candidate for the 7.11 branch.
/external/mesa3d/src/mesa/drivers/common/meta.c
6e423253e74b462950445a7c10a913f5ab2a11c1 17-Sep-2011 Brian Paul <brianp@vmware.com> meta: fix/add checks for GL_EXT_framebuffer_sRGB

This fixes spurious GL errors when the GL_EXT_framebuffer_sRGB extension
is not supported.

Note: This is a candidate for the 7.11 branch
/external/mesa3d/src/mesa/drivers/common/meta.c
093dc9e548537e6c77e33064a584f849ad90dfa5 12-Sep-2011 Dave Airlie <airlied@redhat.com> mesa: introduce a clear color union to be used for int/unsigned buffers

This introduces a new gl_color_union union and moves the current
ClearColorUnclamped to use it, it removes current ClearColor completely and
renames CCU to CC, then all drivers are modified to expected unclamped floats instead.

also fixes st to use translated color in one place it wasn't.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
e3dc78e57a7effbd30dc9539b3ea05ad85ac34e5 09-Sep-2011 Brian Paul <brianp@vmware.com> meta: added _mesa_meta_GetTexImage()

If the texture is compressed, call the meta decompress_texture_image()
function. Otherwise, call the core _mesa_get_teximage() function.
/external/mesa3d/src/mesa/drivers/common/meta.c
8e9485870bfac93d5c26a094390a37aad2e264eb 09-Sep-2011 Brian Paul <brianp@vmware.com> meta: move texcoord setup into setup_texture_coords()
/external/mesa3d/src/mesa/drivers/common/meta.c
eb805a518216ae61317e7eef78a0b2c692c10eae 29-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Remove dd_function_table::CopyColorTable, ::CopyColorSubTable, and ::UpdateTexturePalette

There's nothing left that can call any of these functions. This also
removes the meta-ops code that implemented the first two.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/common/meta.c
0f8c43c34f74b2ebc40ade2944f3b56b7dc606b0 18-Aug-2011 Brian Paul <brianp@vmware.com> meta: use fallback mipmap generation for 1D/2D texture arrays

We could do 1D/2D arrays with textured quad rendering, but it'll take
some work (as with 3D textures).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
f23c3ebeccc5c591b79c10cbdb693270ef27a2f5 13-Aug-2011 Chad Versace <chad@chad-versace.us> mesa: Declare _mesa_meta_begin()/end() as public

Declare _mesa_meta_begin()/end() in meta.h so that drivers can write
custom meta-ops (such as HiZ resolves for i965).

This necessitates moving the the META_* macros into meta.h. To prevent
naming collisions, this commit renames each macro to be MESA_META_*.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/mesa/drivers/common/meta.c
e4fdc95277bd323d8945e20635d3a1702a2e695d 28-Jul-2011 Brian Paul <brianp@vmware.com> mesa: fix format selection for meta CopyTexSubImage()

When we do a glReadPixels into the temporary buffer, we don't want to
use GL_LUMINANCE, GL_LUMINANCE_ALPHA or GL_INTENSITY since they will
compute L=R+G+B which is not what we want.

This bug has existed all along but was only exposed by the elimination
of the driver hook for glCopyTexImage() in
5874890c26f434f54e9218b83fae4eb8175c24e9.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39604
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
808024689247561d3de225856fb6ef17430fd39e 21-Jul-2011 Eric Anholt <eric@anholt.net> meta: Also save/restore clip planes for GLSL.

Fixes user-clip on 965 with 3D clears enabled. I created a separate
flag because I wanted to avoid the overhead of the matrix operations
in this path.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
ecc6a26a3d602e8b649c441077e005dfeb77aff2 21-Jul-2011 Brian Paul <brianp@vmware.com> Merge branch 'remove-copyteximage-hook'
eee570290aebc8a339acd063033e3daefcef2bc6 17-Jul-2011 Eric Anholt <eric@anholt.net> meta: Add a GLSL-based _mesa_meta_Clear() variant.

This cuts out a large portion of the overhead of glClear() from
resetting the texenv state and recomputing the fixed function
programs. It also means less use of fixed function internally in our
GLES2 drivers, which is rather bogus.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
774311fb5403e3da7ff0197199ffad8f34089e6a 20-Jul-2011 Brian Paul <brianp@vmware.com> meta: remove _mesa_meta_CopyTexImage1D/2D()
/external/mesa3d/src/mesa/drivers/common/meta.c
296e6b9038131cd246226881208ffebe3c2683c3 08-Jun-2011 Eric Anholt <eric@anholt.net> meta: Fix glCopyTexImage(GL_LUMINANCE) from non-GL_LUMINANCE source.

glReadPixels() was performing RGB -> L conversion differently from the
glTexImage() style conversion appropriate for glCopyTexImage().

Fixes gles2conform copy_texture.
/external/mesa3d/src/mesa/drivers/common/meta.c
e8ea8793e3c65f7feef063c6edc7b86bf0e66997 01-Jun-2011 Eric Anholt <eric@anholt.net> meta: Don't do sRGB encode for framebuffer blits on sRGB-enabled framebuffers.

Fixes fbo-srgb-blit.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35373
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
a513bee2f247d7cf9cd8e9c3d50f2bd48f136776 01-Jun-2011 Eric Anholt <eric@anholt.net> meta: Don't do srgb to linear decode when blitting srgb textures.

Fixes the GL_SRGB8_ALPHA8 -> GL_RGBA8 blits in fbo-srgb-blit.c

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
8c1637a4c233fd02a57dee1e38ac87012a04c4c5 26-Apr-2011 Eric Anholt <eric@anholt.net> meta: Don't ask for floating point textures if not ARB_texture_float.

I was promoting to float for ARB_color_buffer_float unclamped, which
failed when ARB_texture_float wasn't present. Since the metaops don't
need results outside of [0,1] when not drawing to a floating point
destination, they can just use a fixed point texture when floating
point destinations are impossible.

Fixes regression in fdo23670-depth_test when --enable-texture-float is
not present.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36473
/external/mesa3d/src/mesa/drivers/common/meta.c
fb60040b691c174c1bfffb46cb6c39bbae6f27c5 20-Apr-2011 Eric Anholt <eric@anholt.net> meta: Don't do conditional rendering on GenerateMipmaps and BlitFramebuffer.

The NV_conditional_render spec calls out specific operations that
conditional rendering applies to, which doesn't include these.

Fixes NV_conditional_render/generatemipmap on swrast.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
99fa449bb9cf93a8dd2b840804c5bc44e51483dc 15-Apr-2011 Eric Anholt <eric@anholt.net> meta: Add support for ARB_color_buffer_float to _mesa_meta_Clear().

Tested with piglit arb_color_buffer_float-clear.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
b2491972591788fea0e55805cea3e9be8760969b 16-Apr-2011 Eric Anholt <eric@anholt.net> meta: Add support for ARB_color_buffer_float to _mesa_meta_DrawPixels.

Tested with piglit arb_color_buffer_float-drawpixels.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
ecfaab88b2577bd0395bc05d75a036126806a9c4 10-Apr-2011 Brian Paul <brianp@vmware.com> mesa: move sampler state into new gl_sampler_object type

gl_texture_object contains an instance of this type for the regular
texture object sampling state. glGenSamplers() generates new instances
of gl_sampler_object which can override that state with glBindSampler().
/external/mesa3d/src/mesa/drivers/common/meta.c
b70610b9823fc7dc3672735c11be1a75fbb1a2a4 01-Mar-2011 Brian Paul <brianp@vmware.com> mesa: move PBO-related functions into a new file
/external/mesa3d/src/mesa/drivers/common/meta.c
e1fb511570e9b2a4d015332b7d80f469bf334b2a 12-Jan-2011 Eric Anholt <eric@anholt.net> meta: Actually use mipmapping when generating mipmaps.

With the change to not reset baselevel, this GL_LINEAR filtering was
resulting in generating mipmaps off of the base level instead of the
next higher detail level. Fixes fbo-generatemipmap-filtering.

Reported by: Neil Roberts <neil@linux.intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
bd4a2e9209e13878d052dfb8e981fd798c6e4e40 10-Jan-2011 Eric Anholt <eric@anholt.net> meta: Don't tweak BaseLevel when doing glGenerateMipmap().

We don't need to worry about levels other than MaxLevel because we're
minifying -- the lower levels (higher detail) won't contribute to the
result. By changing BaseLevel, we forced hardware that doesn't
support BaseLevel != 0 to relayout the texture object.
/external/mesa3d/src/mesa/drivers/common/meta.c
2a4df8933eaeb0bd0d6e63fee3d23a47c4b3adb7 10-Dec-2010 Brian Paul <brianp@vmware.com> mesa/meta: fix broken assertion, rename stack depth var

assert(current_save_state < MAX_META_OPS_DEPTH) did not compile.

Rename current_save_state to SaveStackDepth to be more consistent with
the style of the other fields.
/external/mesa3d/src/mesa/drivers/common/meta.c
d1196bbc191c4f1b355d432dcb2eeff9790fda34 10-Dec-2010 Xiang, Haihao <haihao.xiang@intel.com> meta: allow nested meta operations

_mesa_meta_CopyPixels results in nested meta operations on Sandybridge.
Previoulsy the second meta operation overrides all states saved by the
first meta function.
/external/mesa3d/src/mesa/drivers/common/meta.c
ee88727df8b133e99608e5d30cbd50fb6e11628a 24-Nov-2010 Peter Clifton <pcjc2@cam.ac.uk> meta: Mask Stencil.Clear against stencilMax in _mesa_meta_Clear

This fixes incorrect behaviour when the stencil clear value exceeds
the size of the stencil buffer, for example, when set with:

glClearStencil (~1); /* Set a bit pattern of 111...11111110 */
glClear (GL_STENCIL_BUFFER_BIT);

The clear value needs to be masked by the value 2^m - 1, where m is the
number of bits in the stencil buffer. Previously, we passed the value
masked with 0x7fffffff to _mesa_StencilFuncSeparate which then clamps,
NOT masks the value to the range 0 to 2^m - 1.

The result would be clearing the stencil buffer to 0xff, rather than 0xfe.

Signed-off-by: Peter Clifton <pcjc2@cam.ac.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
83e93b6008213ad86607027e8434ecaccc8b1a2c 19-Nov-2010 Brian Paul <brianp@vmware.com> mesa: pass gl_format to _mesa_init_teximage_fields()

This should prevent the field going unset in the future. See bug
http://bugs.freedesktop.org/show_bug.cgi?id=31544 for background.

Also remove unneeded calls to clear_teximage_fields().

Finally, call _mesa_set_fetch_functions() from the
_mesa_init_teximage_fields() function so callers have one less
thing to worry about.
/external/mesa3d/src/mesa/drivers/common/meta.c
47c471f2818bb0d82bc670a4cb0a7e0616231a6d 02-Nov-2010 Francisco Jerez <currojerez@riseup.net> meta: Handle bitmaps with alpha test enabled.

Acked-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
8eaa97592a4330d1a253f6fa32df7a3fd04f53ae 30-Oct-2010 Francisco Jerez <currojerez@riseup.net> meta: Don't try to disable cube maps if the driver doesn't expose the extension.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
7831994868d039da726cc0c1a86b1f94137ad412 02-Nov-2010 Francisco Jerez <currojerez@riseup.net> meta: Fix incorrect rendering of the bitmap alpha component.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
d8463623893b189dae5ab7288395ffb54849c572 02-Nov-2010 Francisco Jerez <currojerez@riseup.net> meta: Don't leak alpha function/reference value changes.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
a974949f3b586eee2bc8d6d97d3adb71796fe167 29-Oct-2010 Eric Anholt <eric@anholt.net> mesa: Make metaops use program refcounts instead of names.

Fixes failure on restoring state when the program was active but
deleted, and the name no longer exists.

Bug #31194
/external/mesa3d/src/mesa/drivers/common/meta.c
84eba3ef71dfa822e5ff0463032cdd2e3515b888 13-Oct-2010 Ian Romanick <ian.d.romanick@intel.com> Track separate programs for each stage

The assumption is that all stages are the same program or that
varyings are passed between stages using built-in varyings.
/external/mesa3d/src/mesa/drivers/common/meta.c
f9995b30756140724f41daf963fa06167912be7f 12-Oct-2010 Kristian Høgsberg <krh@bitplanet.net> Drop GLcontext typedef and use struct gl_context instead
/external/mesa3d/src/mesa/drivers/common/meta.c
a62efdf82c20747feb11dfd7756f0579aa914b57 10-Sep-2010 Eric Anholt <eric@anholt.net> mesa: Remove EXT_convolution.

More optional code.
/external/mesa3d/src/mesa/drivers/common/meta.c
50ac56bf98d6fd16fd1b7534268ee362e45b691d 16-Sep-2010 Francisco Jerez <currojerez@riseup.net> meta: Don't bind the created texture object in init_temp_texture().

This function is executed outside _mesa_meta_begin/end(), that means
that e.g. _mesa_meta_Bitmap() clobbers the texturing state because it
changes the currently active texture object.

There's no need to bind the new texture when it's created, it's done
again later anyway (from setup_drawpix/copypix_texture()).

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
9476efe77ff196993937c3aa2e5bca725ceb0b41 13-Sep-2010 Chia-I Wu <olv@lunarg.com> mesa: Remove unnecessary FEATURE tests.

Remove all FEATURE tests in mesa/drivers/common/. They are not needed
and the code looks better without them.
/external/mesa3d/src/mesa/drivers/common/meta.c
bab484a59b21fff84579a492d079d46e27d486dd 20-Jul-2010 Brian Paul <brianp@vmware.com> mesa: call ctx->Driver.ChooseTextureFormat() only when necessary.

When defining mipmap level 'L' and level L-1 exists and the new level's
internalFormat matches level L-1's internalFormat, then use the same hw
format. Otherwise, do the regular ctx->Driver.ChooseTextureFormat() call.

This avoids a problem where we end up choosing different hw formats for
different mipmap levels depending on how the levels are defined (glTexImage
vs. glCopyTexImage vs. glGenerateMipmap, etc).

The root problem is the ChooseTextureFormat() implementation in some
drivers uses the user's glTexImage format/type parameters in the choosing
heuristic. Later mipmap levels might be generated with different calls
(ex: glCopyTexImage()) so we don't always have format/type info and the
driver may choose a different format.

For more background info see the July 2010 mesa-dev thread "Bug in
_mesa_meta_GenerateMipmap"
/external/mesa3d/src/mesa/drivers/common/meta.c
ca12aefdacd22fb42e3f1d3852db4c12de886554 24-Jun-2010 Brian Paul <brianp@vmware.com> Merge branch 'shader-file-reorg'

1. Move all GL entrypoint functions and files into src/mesa/main/
This includes the ARB vp/vp, NV vp/fp, ATI fragshader and GLSL bits
that were in src/mesa/shader/

2. Move src/mesa/shader/slang/ to src/mesa/slang/ to reduce the tree depth

3. Rename src/mesa/shader/ to src/mesa/program/ since all the
remaining files are concerned with GPU programs.

4. Misc code refactoring. In particular, I got rid of most of the
GLSL-related ctx->Driver hook functions. None of the drivers used
them.

Conflicts:
src/mesa/drivers/dri/i965/brw_context.c
c674a7eb7fb2fd170df7ff5e3cefdddabda1a03f 19-Jun-2010 Will Dyson <will.dyson@gmail.com> Revert "Fix image_matches_texture_obj() MaxLevel check"

This reverts commit a9ee95651131e27d5acf3d10909b5b7e5c8d3e92.
It was based on a failure to understand how ther driver allocates
memory, and causes a regression with Celestia.

Set MaxLevel to dstLevel before allocating new mipmap level.

The radeon driver will fail to allocate space for a new level that
is outside of BaseLevel..MaxLevel. Set MaxLevel before allocating.

Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
ec2b92f98c2e7f161521b447cc1d9a36bce3707c 11-Jun-2010 Brian Paul <brianp@vmware.com> mesa: rename src/mesa/shader/ to src/mesa/program/
/external/mesa3d/src/mesa/drivers/common/meta.c
412cddf954d35282f913d01d83d3cdb45cf0e2d0 11-Jun-2010 Brian Paul <brianp@vmware.com> mesa: move arbprogram.[ch] to main/
/external/mesa3d/src/mesa/drivers/common/meta.c
a37b2219d6e3f299379c6434d65f300660d12c3e 11-Jun-2010 Brian Paul <brianp@vmware.com> mesa: refactor shader api / object code

Remove the unneeded ctx->Driver hooks for shader-related functions.
Move state and API-related things into main/.
/external/mesa3d/src/mesa/drivers/common/meta.c
a94955843059af787ca5d289a87e2f35a869437a 24-May-2010 Brian Paul <brianp@vmware.com> meta: Convert Z value from normalized to object-space in meta code

Convert Z from a normalized value in the range [0, 1] to an
object-space Z coordinate in [-1, +1] so that drawing at the new Z
position with the default/identity ortho projection results in the
original Z value. Used by the meta-Clear, Draw/CopyPixels and Bitmap
functions where the Z value comes from the clear value or raster
position.

Fixes piglit tests fdo23670-depth_test, quad-invariance and
glsl-orangebook-ch06-bump as well as oglc zbfunc.c.

https://bugs.freedesktop.org/show_bug.cgi?id=23670
/external/mesa3d/src/mesa/drivers/common/meta.c
2787a2e731d7628e150d607939509a05500fd29f 27-Apr-2010 Pierre Willenbrock <pierre@pirsoft.de> Disable scissor when begining meta operations

Signed-off-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/common/meta.c
6ef6cdec2ebc91cfbe2b26ad88d702847c750cd0 27-Apr-2010 Pierre Willenbrock <pierre@pirsoft.de> Don't set srcLevel on GL_TEXTURE_RECTANGLE_ARB targets

Signed-off-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/common/meta.c
7cbb7051f42c0220b35ce1e834853dac8706a69a 13-Mar-2010 Eric Anholt <eric@anholt.net> meta: Fix up restoration of state if _mesa_map_pbo_source() fails.
/external/mesa3d/src/mesa/drivers/common/meta.c
541c9c08e575ea93768c2e2cb889d9b236caf40f 13-Mar-2010 Eric Anholt <eric@anholt.net> meta: Properly refcount our saved programs and texobjs.

Found while debugging bug #24119.
/external/mesa3d/src/mesa/drivers/common/meta.c
77fc3ef9116fae6b8b53cda78d97c4ff1ec5c171 04-Mar-2010 Ian Romanick <ian.d.romanick@intel.com> meta: Use the DrawBuffer's stencil size

Previously the code was erroneously using the stencil size of the
context instead of the stencil size of the DrawBuffer. With FBOs
these may be different. As a result, clearing the stencil buffer of
an FBO bound to a context that doesn't have stencil would fail.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
78f72d73ee37c1a269f010e492631503a7fc35b2 24-Feb-2010 Brian Paul <brianp@vmware.com> mesa: disable unreachable meta mipmap gen code

More work is needed to support 3D mipmap generation. Disable unreachable
code until then.

See bug 26722.
/external/mesa3d/src/mesa/drivers/common/meta.c
78a0c353d0f87c85feaa6dcb3042fc25d424f21b 19-Feb-2010 Brian Paul <brianp@vmware.com> mesa: restore _mesa_snprintf() - it's needed for Windows

This reverts part of commit 298be2b028263b2c343a707662c6fbfa18293cb2
/external/mesa3d/src/mesa/drivers/common/meta.c
298be2b028263b2c343a707662c6fbfa18293cb2 19-Feb-2010 Kristian Høgsberg <krh@bitplanet.net> Replace the _mesa_*printf() wrappers with the plain libc versions
/external/mesa3d/src/mesa/drivers/common/meta.c
32f2fd1c5d6088692551c80352b7d6fa35b0cd09 19-Feb-2010 Kristian Høgsberg <krh@bitplanet.net> Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
/external/mesa3d/src/mesa/drivers/common/meta.c
c7ac486261ad30ef654f6d0b1608da4e8483cd40 19-Feb-2010 Kenneth Graunke <kenneth@whitecape.org> Remove _mesa_memcpy in favor of plain memcpy.

This may break the SUNOS4 build, but it's no longer relevant.
/external/mesa3d/src/mesa/drivers/common/meta.c
e7a53c78aebdc8ed3032379314dcd507e2db5262 13-Feb-2010 Vinson Lee <vlee@vmware.com> mesa: Remove unnecessary headers.
/external/mesa3d/src/mesa/drivers/common/meta.c
fd70841121475d7aad98812d6bf9c9c67567b89a 08-Jan-2010 Brian Paul <brianp@vmware.com> Merge branch 'mesa_7_7_branch'

Conflicts:

src/mesa/drivers/dri/i965/brw_wm_emit.c
ef7eb62423077becf2f896f771d6d76e9671f114 07-Jan-2010 Brian Paul <brianp@vmware.com> meta: remove F suffix from _mesa_Ortho() params

_mesa_Ortho() takes GLdoubles.
/external/mesa3d/src/mesa/drivers/common/meta.c
cb3cb96fbd3279bf3dd50439444c4c064ed6f748 07-Jan-2010 Brian Paul <brianp@vmware.com> meta: move destination vertex/projection setup out of _mesa_meta_GenerateMipmap

Based on a patch submitted by Pierre Willenbrock <pierre@pirsoft.de>
/external/mesa3d/src/mesa/drivers/common/meta.c
06970b2ccb6add0696710f01a07ebf9ec3922c80 07-Jan-2010 Brian Paul <brianp@vmware.com> meta: set viewport and projection matrix in _mesa_meta_GenerateMipmap

This fixes mipmap levels being clipped to the last viewport.

Based on a patch submitted by Pierre Willenbrock <pierre@pirsoft.de>
/external/mesa3d/src/mesa/drivers/common/meta.c
a60084088baca0981e5b0f1512831683cd4f25bc 03-Jan-2010 Francis Galiegue <fgaliegue@gmail.com> mesa: fix blend enable/disable calls in meta.c code

Fixes regression in some DRI drivers since the GL_EXT_draw_buffers2 changes.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/drivers/common/meta.c
fd5511d27fc44096117c47ab503fb5b47f993061 30-Dec-2009 Brian Paul <brianp@vmware.com> mesa: implement per-buffer color masking

This is part of the GL_EXT_draw_buffers2 extension and part of GL 3.0.

The ctx->Color.ColorMask field is now a 2-D array. Until drivers are
modified to support per-buffer color masking, they can just look at
the 0th color mask.

The new _mesa_ColorMaskIndexed() function will be called by
glColorMaskIndexedEXT() or glColorMaski().
/external/mesa3d/src/mesa/drivers/common/meta.c
3728673bd1b974e54858fbab6ff62d3607b0d3f0 29-Dec-2009 Brian Paul <brianp@vmware.com> mesa: per-buffer blend enabled flags

ctx->Color.BlendEnabled is now a GLbitfield instead of a GLboolean to
indicate blend on/off status for each color/draw buffer.

This is infrastructure for GL_EXT_draw_buffers2 and OpenGL 3.x

New functions include _mesa_EnableIndexed(), _mesa_DisableIndexed(), and
_mesa_IsEnabledIndexed(). The enable function corresponds to
glEnableIndexedEXT() for GL_EXT_draw_buffers2 or glEnablei() for GL3.

Note that there's quite a few tests for ctx->Color.BlendEnabled != 0 in
drivers, etc. Those tests can remain as-is since the mask will be 0 or ~0
unless GL_EXT_draw_buffers2 is enabled.
/external/mesa3d/src/mesa/drivers/common/meta.c
69346c56a17ba9a74b7f2226c0b4d5ce0bbb1f15 14-Dec-2009 Brian Paul <brianp@vmware.com> mesa/meta: move BindTexture() call in _mesa_meta_GenerateMipmap()

This is a follow-up to commit e3fa700c178e11e6735430119232919176ab7b42.

The call to _mesa_BindTexture() must be before we set any other texture
object state, namely the _mesa_TexParameteri() calls.

This fixes bug 25601 (piglit gen-nonzero-unit failure).
/external/mesa3d/src/mesa/drivers/common/meta.c
e3fa700c178e11e6735430119232919176ab7b42 09-Dec-2009 Ian Romanick <ian.d.romanick@intel.com> meta: Bind texture to unit 0 for mipmap generation

If the active texture unit on entry to mipmap generation is not zero, bind the
texture to unit zero.

Fixes bug #24219.
/external/mesa3d/src/mesa/drivers/common/meta.c
7157479b253b3051f1ec454a39b2aff825bab047 31-Oct-2009 Brian Paul <brianp@vmware.com> mesa: use _mesa_get_current_tex_object()
/external/mesa3d/src/mesa/drivers/common/meta.c
1f196b786d6bd0c6a5dbdc638574ff716cc3d4de 29-Oct-2009 Brian Paul <brianp@vmware.com> Merge branch 'texformat-rework'

Conflicts:
src/mesa/drivers/dri/radeon/radeon_fbo.c
src/mesa/drivers/dri/s3v/s3v_tex.c
src/mesa/drivers/dri/s3v/s3v_xmesa.c
src/mesa/drivers/dri/trident/trident_context.c
src/mesa/main/debug.c
src/mesa/main/mipmap.c
src/mesa/main/texformat.c
src/mesa/main/texgetimage.c
05ec586851290698730990cd810e1fe4d74d2749 27-Oct-2009 Brian Paul <brianp@vmware.com> mesa: s/Bilt/Blit
/external/mesa3d/src/mesa/drivers/common/meta.c
cbd20e18a0f82a653513d165694ed7bbb336e765 20-Oct-2009 Eric Anholt <eric@anholt.net> meta: Fix the BufferSubData in meta clear to be BufferData.

Fixes a 3.4% +/- 1.3% performance regression in my GL demo (n=3). The
other meta code could probably also use the same treatment.
/external/mesa3d/src/mesa/drivers/common/meta.c
98eb7a14a44f8e5c3c2d2f1418d7d4e4ed0fe5e8 14-Oct-2009 Brian Paul <brianp@vmware.com> mesa: remove left-over debug printf
/external/mesa3d/src/mesa/drivers/common/meta.c
eefecf5d2a5bf9fc0f0f7919faf1747b0add8d6f 13-Oct-2009 Brian Paul <brianp@vmware.com> mesa: whitespace fixes
/external/mesa3d/src/mesa/drivers/common/meta.c
c8413351c33d5758da057b56a140c9ee622a5e4a 13-Oct-2009 Brian Paul <brianp@vmware.com> mesa: do RTT check in _mesa_meta_check_generate_mipmap_fallback()

We need to check that we can actually render to the texture's format
before doing mipmap generation.

This may fix bug 24219.
/external/mesa3d/src/mesa/drivers/common/meta.c
3f928b355275c0e76ead6febe471a552ece8b0a8 13-Oct-2009 Brian Paul <brianp@vmware.com> mesa: save/set/restore texture base/wrap state in blitframebuffer_texture()
/external/mesa3d/src/mesa/drivers/common/meta.c
f67bc2e87255298ac22e8ccd98f482cc62d0ec26 08-Oct-2009 Brian Paul <brianp@vmware.com> Merge branch 'mesa_7_6_branch'

Conflicts:

src/mesa/drivers/common/meta.c
7dd2c0afd68a90bb6b1f5f030c8d60bf6a562071 07-Oct-2009 Brian Paul <brianp@vmware.com> mesa: don't need to free textures, VBOs, etc. in _mesa_meta_free()

They're freed by the normal context deallocation code.
Fixes Blender crash, bug 24185.
/external/mesa3d/src/mesa/drivers/common/meta.c
4a6759b7789dc703a8ee9f1cf08af22c6e8101fb 03-Oct-2009 Michel Dänzer <daenzer@vmware.com> meta: Make sure texImage->TexFormat is valid for CopyTex(Sub)Image.
/external/mesa3d/src/mesa/drivers/common/meta.c
be16acaafa2f28bb7d4551ed93d2e290c928006c 02-Oct-2009 Brian Paul <brianp@vmware.com> mesa: optimized _mesa_meta_BlitFramebuffer() for src=texture case

If the src renderbuffer is actually a texture, we can directly use that
texture as the src and avoid a copy.
/external/mesa3d/src/mesa/drivers/common/meta.c
f1cab802b8e78906413f219ad354f5d5500b4d3f 02-Oct-2009 Brian Paul <brianp@vmware.com> mesa: added _mesa_meta_check_generate_mipmap_fallback()
/external/mesa3d/src/mesa/drivers/common/meta.c
1f7c914ad0beea8a29c1a171c7cd1a12f2efe0fa 01-Oct-2009 Brian Paul <brianp@vmware.com> mesa: replace gl_texture_format with gl_format

Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum.
ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x.
gl_texture_format will go away next.
/external/mesa3d/src/mesa/drivers/common/meta.c
d492e7b017178c03b4979cf4ff266162d83c4f37 28-Sep-2009 Eric Anholt <eric@anholt.net> meta: Fix invalid PBO access from DrawPixels when trying to just alloc.

This whole reuse of buffers (TexSubImage instead of TexImage, SubData
instead of Data) is bad for hardware drivers, but it's even worse when
we accidentally try to access the 2x2 PBO to fill the new 16x16 texture
we're creating, producing GL errors.

Fixes piglit pbo-drawpixels. Bug #14163.
/external/mesa3d/src/mesa/drivers/common/meta.c
2de768328067fa42501bdd4b753490e7a00167a4 28-Sep-2009 Brian Paul <brianp@vmware.com> mesa: use _mesa_get_format_base_format()
/external/mesa3d/src/mesa/drivers/common/meta.c
0876618a8d118b39b80963cc0d5e7a118961aa83 25-Sep-2009 Brian Paul <brianp@vmware.com> mesa: _mesa_meta_GenerateMipmap() now working

Handles GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP.
But GL_TEXTURE_3D and texture borders not supported yet.
/external/mesa3d/src/mesa/drivers/common/meta.c
02f2bcdf1d28f2bd6382fb6048c497ef76ba86b2 23-Sep-2009 Brian Paul <brianp@vmware.com> Merge branch 'mesa_7_6_branch'
926b965ed53efc06a9d7cc6e07eff853b263960a 22-Sep-2009 Brian Paul <brianp@vmware.com> mesa: don't re-use the meta glDrawPixels VBO; create a new one each time

This should help to work around bugs 24083 and 23670.
/external/mesa3d/src/mesa/drivers/common/meta.c
ebf2710b2fd21ae9a6604c015ca7a948589f5a8c 20-Sep-2009 Brian Paul <brianp@vmware.com> Merge branch 'mesa_7_6_branch'

Conflicts:
src/mesa/drivers/dri/intel/intel_clear.c
ed4076b5b8c5d3c024e291f42a8730b4f71226c9 20-Sep-2009 Brian Paul <brianp@vmware.com> mesa: remove redundant readbuffer check
/external/mesa3d/src/mesa/drivers/common/meta.c
4de8e2123ebeb50db252b2bb57fb167058fa4683 20-Sep-2009 Brian Paul <brianp@vmware.com> mesa: rename functions to be more consistant with rest of mesa
/external/mesa3d/src/mesa/drivers/common/meta.c
3e5a35269b201d25e2a63743d8d4b1b4311b6fb0 20-Sep-2009 Brian Paul <brianp@vmware.com> mesa: meta functions for glCopyColorTable, glCopyConvolutionFilter, etc
/external/mesa3d/src/mesa/drivers/common/meta.c
b0e9ea60840b5161634767e391c601ad0cc935b2 19-Sep-2009 Brian Paul <brianp@vmware.com> mesa: fix some glCopyTex[Sub]Image regressions related to convolution
/external/mesa3d/src/mesa/drivers/common/meta.c
fac38e8c8f1814ae54703b872db8c6dd21c34a3b 17-Sep-2009 Brian Paul <brianp@vmware.com> mesa: fix clip plane, fog issues
/external/mesa3d/src/mesa/drivers/common/meta.c
1d8fbef4f2b1bccb49b40375891b66caf5395b15 17-Sep-2009 Brian Paul <brianp@vmware.com> mesa: meta driver functions for glCopyTex[Sub]Image()

Implement in terms of glReadPixels + glTex[Sub]Image().
This will allow us to get rid of some swrast texture code.
/external/mesa3d/src/mesa/drivers/common/meta.c
b0c52e491d4f1ad4d16352d1aae77bc879b8da0a 15-Sep-2009 Brian Paul <brianp@vmware.com> mesa: remove incorrect texture state check

Fixes incorrectly textured bitmap text in engine demo.
It's incorrect to test the texture enable bits here since they may have
been changed by disabling the shader above. Optimization is still possible
but will have to be reexamined.
/external/mesa3d/src/mesa/drivers/common/meta.c
0ef5b627871eb893309fe784bc47d0d8d69f4c57 11-Sep-2009 Brian Paul <brianp@vmware.com> mesa: nicer vertex setup
/external/mesa3d/src/mesa/drivers/common/meta.c
d9dc4cb0e4f578da9e50c9d1ba6fd9c22ea2fca6 10-Sep-2009 Brian Paul <brianp@vmware.com> Merge branch 'mesa_7_6_branch'
c5f8594aebac4b8ba972d09ab18dabd9cc47c8e9 10-Sep-2009 Brian Paul <brianp@vmware.com> mesa: need to set all stencil bits to 0 before setting the 1 bits

Plus, check for pixel transfer stencil index/offset.
/external/mesa3d/src/mesa/drivers/common/meta.c
f89751e71928770472d61e3b7069a5d0e2125f0e 10-Sep-2009 Mathias Frohlich <M.Froehlich@science-computing.de> mesa: fix cut&paste typos
/external/mesa3d/src/mesa/drivers/common/meta.c
7bf63473623e01933adc0e8f4464eda8f2860564 09-Sep-2009 Brian Paul <brianp@vmware.com> Merge branch 'mesa_7_6_branch'
89a765e92b4847f80848c8be89efbce2d021434b 09-Sep-2009 Brian Paul <brianp@vmware.com> mesa: disable GL_LUMINANCE case in _mesa_meta_draw_pixels()

Works around a bug found on i965. See bug 23670.
/external/mesa3d/src/mesa/drivers/common/meta.c
23663ae9148b9a976b8a95e48af8404cbda046fe 06-Sep-2009 Brian Paul <brianp@vmware.com> mesa: initial version of _mesa_meta_generate_mipmap()

Incomplete and totally untested. Based on intel_generate_mipmap().
/external/mesa3d/src/mesa/drivers/common/meta.c
886e7b318dc2add8cd51abb7ba4fdc33af741586 04-Sep-2009 Brian Paul <brianp@vmware.com> mesa: use separate temp texture for bitmaps
/external/mesa3d/src/mesa/drivers/common/meta.c
b2951ffe962f56cb88cc2e4eabe4aa4eb7232170 04-Sep-2009 Brian Paul <brianp@vmware.com> mesa: temp_texture changes
/external/mesa3d/src/mesa/drivers/common/meta.c
f477fa7a85b76256aea910bd03ee83a26fedae4f 04-Sep-2009 Brian Paul <brianp@vmware.com> mesa: free meta bitmap buffers
/external/mesa3d/src/mesa/drivers/common/meta.c
0e5293a24019a777c46734f9b5f6e8d764c11672 04-Sep-2009 Brian Paul <brianp@vmware.com> mesa: use _mesa_set_enable()
/external/mesa3d/src/mesa/drivers/common/meta.c
bcb62ae78a9d2f4d08001e9f207b6f1291443968 04-Sep-2009 Brian Paul <brianp@vmware.com> mesa: _mesa_meta_bitmap() function
/external/mesa3d/src/mesa/drivers/common/meta.c
92d63931e2c42ececaec33f68e1bc388764dd62e 01-Sep-2009 Brian Paul <brianp@vmware.com> mesa: obey stencil write mask in _mesa_meta_draw_pixels()
/external/mesa3d/src/mesa/drivers/common/meta.c
056612241ae8f8bc836ab78705a154a6d6477e0f 01-Sep-2009 Brian Paul <brianp@vmware.com> mesa: implement GL_DEPTH_BUFFER_BIT for _mesa_meta_blit_framebuffer()
/external/mesa3d/src/mesa/drivers/common/meta.c
7a78e6e8af50f1254a6d9d1d8746a7b10add9668 01-Sep-2009 Brian Paul <brianp@vmware.com> mesa: disable another debug test
/external/mesa3d/src/mesa/drivers/common/meta.c
5b0f7c6c3bbef1354725b0231c80509d880a40fe 01-Sep-2009 Brian Paul <brianp@vmware.com> mesa: make verts[] arrays local vars
/external/mesa3d/src/mesa/drivers/common/meta.c
1fc713a1e78278e7b62bd5d8e11ac5c0093677bf 01-Sep-2009 Brian Paul <brianp@vmware.com> mesa: implement depth/stencil formats for meta glDrawPixels
/external/mesa3d/src/mesa/drivers/common/meta.c
9c41931c0fbfc108eeba0af18db29a24b394d091 01-Sep-2009 Brian Paul <brianp@vmware.com> mesa: remove accidentally commited debug/disabled code
/external/mesa3d/src/mesa/drivers/common/meta.c
04f8193aadaf3f70b2ab37a26546b9cef1047887 30-Aug-2009 Brian Paul <brianp@vmware.com> mesa: consolidate texture-related code in meta.c

Also, allow using texture rectangles, NPOT textures or regular POT textures
(preferred in that order).
/external/mesa3d/src/mesa/drivers/common/meta.c
0243f79eac707cb2209346b0be2f7b67ce6efdf8 27-Aug-2009 Brian Paul <brianp@vmware.com> mesa: avoid redundant viewport changes in meta code
/external/mesa3d/src/mesa/drivers/common/meta.c
73b150c816c46a88e3e5d97f9b73ab0095f2bc60 13-Aug-2009 Brian Paul <brianp@vmware.com> mesa: refactor: move _mesa_is_color/depth/stencil_format() helpers to image.c
/external/mesa3d/src/mesa/drivers/common/meta.c
fd90d8000c163498646857b19ef715de3a585f9c 12-Aug-2009 Brian Paul <brianp@vmware.com> mesa: handle glDrawPixels images which are larger than max rect texture size
/external/mesa3d/src/mesa/drivers/common/meta.c
dba6d52ba060246fbe04e4aa0875eb1efc53b1ab 12-Aug-2009 Brian Paul <brianp@vmware.com> mesa: added _mesa_meta_draw_pixels()
/external/mesa3d/src/mesa/drivers/common/meta.c
f8218663609f857f7ec5d43285dc918622e16392 12-Aug-2009 Brian Paul <brianp@vmware.com> mesa: added META_FOG and optimize some meta_begin/end() code
/external/mesa3d/src/mesa/drivers/common/meta.c
edb991b7bcb1ed6c3ad352750c6613672039a901 10-Aug-2009 Brian Paul <brianp@vmware.com> mesa: save/restore texture matrix in meta code

Also, save/restore viewport and texture state in _mesa_meta_copy_pixels()
/external/mesa3d/src/mesa/drivers/common/meta.c
2ad10c966c87b2efc956bcc58aaedc60f0a5c6a4 10-Aug-2009 Brian Paul <brianp@vmware.com> mesa: for meta blit, check max texture size, use glCopyTexSubImage2D() when possible
/external/mesa3d/src/mesa/drivers/common/meta.c
c16fa388d3f1b941fbee2909a92b6fea10ef4bfe 10-Aug-2009 Brian Paul <brianp@vmware.com> mesa: initial meta implementation of glCopyPixels()
/external/mesa3d/src/mesa/drivers/common/meta.c
36a222cf04da18c96d2335fcae2f22f14ab013f4 10-Aug-2009 Brian Paul <brianp@vmware.com> mesa: remove debug flush call
/external/mesa3d/src/mesa/drivers/common/meta.c
33a838beb913c011b5ee8158c2717b7c8c351b17 10-Aug-2009 Brian Paul <brianp@vmware.com> mesa: new driver meta-ops module

Implement glClear() in terms of quad rendering, implement glBlitFramebuffer()
in terms of glCopyTexImage2D + textured quad, etc.

There have been several places in the drivers where we've implemented
meta rendering similar to this. This is an effort to do it in a more
portable and more efficient form.

The _mesa_meta_begin/end() functions act like glPush/PopAttrib() but are
lighter-weight. Plus, _mesa_meta_begin() resets GL state back to default
values (texturing off, identity vertex transform, etc) so the meta drawing
functions don't have to worry about it.

For now only _mesa_mesa_blit_framebuffer() and _mesa_meta_clear() are
implemented. glDrawPixels() and glCopyPixels() would be the next candidates.
/external/mesa3d/src/mesa/drivers/common/meta.c