Commit graph

46840 commits

Author SHA1 Message Date
Ian Romanick
cb016bbb1d mesa: Advertise NV_draw_buffers in OpenGL ES 2.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:57 -07:00
Ian Romanick
f708166aad mesa/es: Allow querying GL_DRAW_BUFFERi in OpenGL ES 2.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:57 -07:00
Ian Romanick
e0d5cb0f4f mesa/es: Allow querying GL_MAX_COLOR_ATTACHMENTS in OpenGL ES 2.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:57 -07:00
Ian Romanick
2e3a4ab818 mesa/es: Allow other color attachments in OpenGL ES 2.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:57 -07:00
Ian Romanick
43251b970d mesa/es: Make glDrawBuffersNV available in OpenGL ES 2.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:57 -07:00
Ian Romanick
188123ca06 glapi: Add entry point for NV_draw_buffers
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:57 -07:00
Ian Romanick
b2f23438a2 glapi: Move ARB_draw_buffers extension to a separate file
This also moves ATI_draw_buffers.  This is to facilitate enabling
NV_draw_buffers in OpenGL ES 2.0.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:56 -07:00
Ian Romanick
accf293a33 mesa/es: Remove redundant renderbuffer target validation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:56 -07:00
Ian Romanick
6dd8e76869 mesa/es: Validate FBO target enum in Mesa code rather than the ES wrapper
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:56 -07:00
Ian Romanick
7e4cb32d05 mesa/es: Validate FBO attachment enum in Mesa code rather than the ES wrapper
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:56 -07:00
Stéphane Marchesin
3db309aece configure: replace pkg-config calls with $(PKG_CONFIG) in the makefiles.
Us poor souls who cross compile mesa want to be able to specify which pkg-config to pick, or at least just change one place.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2011-10-04 11:19:48 -07:00
Stephen White
cd9627777c st/glx: Set the drawable attribute on xmesa_buffer creation.
Otherwise we'll be unable to use our pbuffers.
2011-10-04 11:19:45 -07:00
Marek Olšák
5506f6ef96 r300g: fix rendering with a non-zero index bias in draw_elements_immediate
NOTE: This is a candidate for the stable branches.
2011-10-04 17:45:53 +02:00
Guillem Jover
8fd39be383 docs: Update references to README files
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-10-04 07:49:04 -06:00
Guillem Jover
963727aec7 Remove remnants of legacy glide support
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-10-04 07:48:50 -06:00
Guillem Jover
0060551856 Ignore all shared objects
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-10-04 07:48:45 -06:00
Marek Olšák
024ac93e60 r600g: fix parsing TGSI declarations
It was a lucky coincidence that it worked.
2011-10-04 04:22:22 +02:00
Brian Paul
5f4f07f4ea nouveau: remove unused code, unused var 2011-10-03 18:20:59 -06:00
Brian Paul
c8e6565280 i915: don't include texstore.h 2011-10-03 18:20:59 -06:00
Brian Paul
d646d06929 i965: remove unneeded includes of texstore.h 2011-10-03 18:20:59 -06:00
Brian Paul
9119269ca1 swrast: fix delayed texel buffer allocation regression
Commit 617cdcd4c7 delayed the texel
buffer allocation until texture_combine() is called.  But the
texel buffer is needed sooner in _swrast_texture_span() at line 649.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41433
2011-10-03 17:51:06 -06:00
Brian Paul
6a04fa9cd4 mesa: fix warning (MSVC error) about void pointer arithmetic 2011-10-03 17:37:04 -06:00
Eric Anholt
669f1822d2 i965: Add support for GL_EXT_texture_array and GL_MESA_texture_array. 2011-10-03 13:29:38 -07:00
Eric Anholt
82691574b6 intel: Add a safety check for mapping 1D texture arrays.
So easy to screw up with the crazy way GL manages them.
2011-10-03 13:29:38 -07:00
Eric Anholt
cb86560ddb intel: Add debug output to intel_map_texture_image. 2011-10-03 13:29:38 -07:00
Eric Anholt
fd99cd0e10 intel: Add a helper function for getting miptree size from a texture image.
With 1D array textures, we no longer agree between the GL information
about width/height/depth of a texture and how we lay out a miptree.
2011-10-03 13:29:38 -07:00
Eric Anholt
2e0aefc1b9 i965: Refactor out the cube map setup for general texture array setup.
This is just moving the code out with s/6/slices/.
2011-10-03 13:29:38 -07:00
Eric Anholt
372cf26698 mesa: Reuse existing make_2d_mipmap for 2D array generation.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-03 13:29:38 -07:00
Eric Anholt
6fc576fd8a mesa: Make the uncompressed sw mipmap gen path do a Map per 1D array slice.
This also fixes what was probably a bug in 1D arrays with border.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-03 13:29:38 -07:00
Eric Anholt
229ebf511d mesa: When storing texture data for a 1D array, map each slice separately.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-03 13:29:38 -07:00
Eric Anholt
5324f9c48d swrast: When asked to map a slice of a 1D array, give back that slice.
Until now, we've been treating 1D arrays as a single slice, and each
array slice is actually just a row of the 2D texture.  While swrast
still stores them this way, hardware drivers think that 1D arrays have
actual separate slices not stored as contiguous rows.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-03 13:29:38 -07:00
Eric Anholt
b07c78bfe9 intel: Consolidate texture validation copy code, and reuse it correctly.
The path for ->Data was failing to be called for the FBO draw offset
fallback, and also had mismatched compressed texture support code.

This drops the intel_prepare_render() in the blit path.  We aren't
copying to/from a GL_FRONT buffer, so it doesn't matter.
2011-10-03 13:29:38 -07:00
Eric Anholt
055995abc4 intel: Clean up the function chain for mapping texture images for swrast.
Too many separate functions each called from one location (in
different files).  This code should all die soon when swrast starts
using MapTextureImage.
2011-10-03 13:29:38 -07:00
Eric Anholt
9aff2944a4 intel: Make PBO TexImage use AllocTextureImageBuffer like non-PBO does.
Now that whole block that also lives in AllocTextureImageBuffer can go
away.
2011-10-03 13:29:37 -07:00
Eric Anholt
18198e299b intel: Rely on Mesa core for glTexImage storage.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-03 13:29:37 -07:00
Eric Anholt
a73d56dce3 intel: Allocate s8z24 separate renderbuffers from AllocTextureImageBuffer().
Before, we were only allocating these from our TexImage, so if the
texture image was set up in any other way (non-accelerated
glGenerateMipmaps()), they'd be missing or wrong.
2011-10-03 13:29:37 -07:00
Eric Anholt
e928c34d3e intel: Add an AllocTextureImageBuffer() implementation using miptrees.
Now we can rely on Mesa core for uploads of data without introducing
an extra copy at validate time.
2011-10-03 13:29:37 -07:00
Brian Paul
e0304180c3 mesa: Convert _mesa_generate_mipmap to MapTexImage()-based access.
Now that we can zero-copy generate the mipmaps into brand new
glTexImage()-generated storage using MapTextureImage(), we no longer
need to allocate image->Data in mipmap generate.  This requires
deleting the drivers' old overrides of the miptree tracking after
calling _mesa_generate_mipmap at the same time, or the drivers
promptly lose our newly-generated data.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-03 13:29:30 -07:00
Kenneth Graunke
1165b64f56 i965: Stop lowering integer division to multiply and reciprocal.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-02 17:01:21 -07:00
Kenneth Graunke
b9af592dfa i965: Reverse the operands for INT DIV prior to Gen6.
Apparently on Gen4 and 5, the denominator comes first.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-02 17:01:12 -07:00
Kenneth Graunke
1d4f3ca8f0 i965/vs: Implement integer quotient and remainder math operations.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-02 17:01:11 -07:00
Kenneth Graunke
ff8f272b0d i965/fs: Implement integer quotient and remainder math operations.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-02 17:01:09 -07:00
Kenneth Graunke
6960f786c8 i965: Set the signed/unsigned type bit in Gen4/5 math messages.
It never mattered before since we only did floating point math.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-02 17:01:07 -07:00
Kenneth Graunke
6b10aab2bb i965: Fix message and response length calculations for INT DIV.
Both POW and INT DIV need a message length of 2; previously, we only
checked for POW.

Also, BRW_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER has a response
length of 2; previously, we only checked for SINCOS.  We don't use this
message, but in case we ever decide to, we may as well fix it now.

While we're at it, just move these computations into
brw_set_math_message, since they're entirely based on the function.
This fixes it for both brw_math and the old backend's brw_math_16.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-02 17:01:04 -07:00
Kenneth Graunke
ee2bf3a4b6 i965: Fix assertions about register types for INT DIV in brw_math.
BRW_MATH_FUNCTION_REMAINDER was missing.  Also, it seems worthwhile to
assert that INT DIV's arguments are signed/unsigned integers.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-02 17:01:02 -07:00
Kenneth Graunke
e66fc1cb03 ir_to_mesa: Don't assertion fail on integer modulus.
Drivers implementing GLSL 1.30 want to do integer modulus, and until we
can stop generating code via ir_to_mesa, it's easier to make it silently
generate rubbish code.  Multiply will do.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-02 17:00:00 -07:00
Tom Stellard
d64c6d2ffc r300/compiler: Fix error in OMOD optimization
Classic compiler mistake.  In the example below, the OMOD optimization
was combining instructions 4 and 10, but since there was an instruction
(#8) in between them that wrote to the same registers as instruction 10,
instruction 11 was reading the wrong value.

Example of the mistake:

Before OMOD:
4: MAD temp[0].y, temp[3]._y__, const[0]._x__, const[0]._y__;
...
8: ADD temp[2].x, temp[1].x___, -temp[4].x___;
...
10: MUL temp[2].x, const[1].y___, temp[0].y___;
11: FRC temp[5].x, temp[2].x___;

After OMOD:
4: MAD temp[2].x / 8, temp[3]._y__, const[0]._x__, const[0]._y__;
...
8: ADD temp[2].x, temp[1].x___, -temp[4].x___;
...
11: FRC temp[5].x, temp[2].x___;

https://bugs.freedesktop.org/show_bug.cgi?id=41367
2011-10-02 15:21:15 -07:00
Tom Stellard
13814b0103 r300/compiler: Rewrite source swizzles when using OMOD 2011-10-02 15:21:15 -07:00
Tom Stellard
8b0418e478 r300/compiler: Fix rc_normal_rewrite_writemask()
This function had not been updated to use conversion swizzles.
2011-10-02 15:21:15 -07:00
Tom Stellard
b5ecf5ba46 r300/compiler: Use consistent src swizzles for transcendent instructions
Source swizzles for transcendent instructions were being stored in the X
channel regardless of what channel the instruction was writing.
This was causing problems for some helper functions that were expecting
source swizzles to occupy channels corresponding to the instruction's
writemask.  This commit makes transcendent instructions follow the same
convention as normal instructions for representing source swizzles.

Previous behavior:
LG2 temp[0].y, input[0].x___;

Current behavior:
LG2 temp[0].y, input[0]._x__;
2011-10-02 15:21:15 -07:00