Commit Graph

36267 Commits

Author SHA1 Message Date
Vinson Lee 20d85865ec st/mesa: Include mtypes.h in st_cb_drawpixels.c.
Include mtypes.h for gl_context symbol.
2011-01-05 16:34:29 -08:00
Eric Anholt 1b18b45d79 intel: Clarify first_level/last_level vs baselevel/maxlevel by deletion.
This has always been ugly about our texture code -- object base/max
level vs intel object first/last level vs image level vs miptree
first/last level.  We now get rid of intelObj->first_level which is
just tObj->BaseLevel, and make intelObj->_MaxLevel clearly based off
of tObj->_MaxLevel instead of duplicating its code (incorrectly, as
image->MaxLog2 only considers width/height and not depth!)
2011-01-05 16:11:30 -08:00
Eric Anholt 9b7f57b18e mesa: Consider textures incomplete when maxlevel < baselevel.
See section 3.8.10 of the GL 2.1 specification.  There's no way to do
anything sane with that, and drivers would get all sorts of angry.
2011-01-05 15:51:37 -08:00
Eric Anholt 39cc0ee3ea i915: Enable LOD preclamping on 8xx like on 915/965.
Fixes lodclamp-between and lodclamp-between-max.
2011-01-05 14:50:27 -08:00
Eric Anholt 973e821a63 i915: Implement min/max lod clamping in hardware on 8xx.
This avoids 8xx-specific texture relayout for min/max lod changes.
One step closer to avoiding relayout for base/maxlevel changes!
2011-01-05 14:50:24 -08:00
Eric Anholt 6f31da584f intel: Drop TEXTURE_RECTANGLE check in miptree layout setup.
It's already handled by our non-mipmapped MinFilter, since
TEXTURE_RECTANGLE is always NEAREST or LINEAR.
2011-01-05 14:45:16 -08:00
Eric Anholt 8f0005bfd5 intel: Clean up redundant setup of firstLevel.
It's always BaseLevel (since TEXTURE_RECTANGLE's baselevel can't be
changed from 0), except for 8xx minlod hilarity.
2011-01-05 14:45:16 -08:00
Eric Anholt e2ee0c55d3 intel: Drop a check for GL_TEXTURE_4D_SGIS.
The SGIS_texture4D extension was thankfully never completed, so we
couldn't implement it if we wanted to.
2011-01-05 14:45:16 -08:00
Vinson Lee d5435b3f0c swrast: Remove unnecessary headers. 2011-01-05 13:47:02 -08:00
Eric Anholt 332a90e101 i965: Simplify the renderbuffer setup code.
It was quite a mess by trying to do NULL renderbuffers and real
renderbuffers in the same function.  This clarifies the common case of
real renderbuffers.
2011-01-05 10:28:10 -08:00
Michel Dänzer c7c1e5338c st/xorg: Flesh out colour map support and support depth 8. 2011-01-05 11:41:56 +01:00
Xiang, Haihao 266d8eed69 i965: use BLT to clear buffer if possible on Sandybridge
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=32713
2011-01-05 14:12:40 +08:00
Eric Anholt 06cb1a6a5b i965: Add support for SRGB DXT1 formats.
This makes
fbo-generatemipmap-formats GL_EXT_texture_sRGB-s3tc
match
fbo-generatemipmap-formats GL_EXT_texture_compression_s3tc

and swrast in bad DXT1_RGBA alpha=0 handling, but it means we won't
unpack and repack someone's textures into uncompressed SARGB8 format.
2011-01-04 16:43:35 -08:00
Vinson Lee 5a3f31575b glcpp: Add test for recursive #define. 2011-01-04 16:39:19 -08:00
Eric Anholt 3488b14a04 mesa: Fix the baseFormat for GL_COMPRESSED_SLUMINANCE_EXT.
It's just LUMINANCE, not LUMINANCE_ALPHA.  Fixes
fbo-generatemipmap-formats GL_EXT_texture_sRGB-s3tc assertion failure
when it tries to pack the L8 channels into LUMINANCE_ALPHA and wonders
why it's trying to do that.
2011-01-04 15:25:35 -08:00
Eric Anholt 5dbb856e96 intel: Merge our choosetexformat fallbacks into core.
We now share the type/format -> MESA_FORMAT_* mappings with software
mesa, and the core supports most of the fallbacks hardware drivers
will want.
2011-01-04 14:42:54 -08:00
Eric Anholt 001d944fd5 mesa: Make _mesa_choose_tex_format() choose formats out of a supported table.
Right now this is just tweaking the current code to look at the table.
Choosing actually supported formats will come later.
2011-01-04 14:14:17 -08:00
Vinson Lee 6530944b50 glcpp: Add division by zero test cases. 2011-01-04 13:18:19 -08:00
Marek Olšák 50630f9016 mesa: preserve 10 bits of precision in the texstore general path for ARGB2101010
Use make_temp_float_image instead of _make_temp_chan_image.
The latter converts the texture to 8 bits/component, losing 2 bits.
2011-01-04 21:59:56 +01:00
Marek Olšák 73e8a27387 st/mesa: advertise GL_ARB_half_float_pixel
This extension doesn't appear to need any driver-specific parts.
2011-01-04 21:59:56 +01:00
Marek Olšák 8543902bfb r300/compiler: disable the rename_regs pass for loops
This workaround fixes rendering of kwin thumbnails.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-04 21:58:51 +01:00
Alex Deucher f28bb6bdd1 r600g: support up to 64 shader constants
From the r600 ISA:
Each ALU clause can lock up to four sets of constants
into the constant cache.  Each set (one cache line) is
16 128-bit constants. These are split into two groups.
Each group can be from a different constant buffer
(out of 16 buffers). Each group of two constants consists
of either [Line] and [Line+1] or [line + loop_ctr]
and [line + loop_ctr +1].

For supporting more than 64 constants, we need to
break the code into multiple ALU clauses based
on what sets of constants are needed in that clause.

Note: This is a candidate for the 7.10 branch.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-01-04 15:37:12 -05:00
Tom Stellard e96e86d07b r300/compiler: Fix black terrain in Civ4
rc_inst_can_use_presub() wasn't checking for too many RGB sources in
Alpha instructions or too many Alpha sources in RGB instructions.

Note: This is a candidate for the 7.10 branch.
2011-01-04 11:25:27 -08:00
Chad Versace 68d06b1454 glsl: Check that integer vertex outputs are qualified with flat
Perform this check in ast_declarator_list::hir().

From section 4.3.6 of the GLSL 1.30 spec:
   "If a vertex output is a signed or unsigned integer or integer
   vector, then it must be qualified with the interpolation
   qualifier
   flat."
2011-01-04 10:49:10 -08:00
Chad Versace b84e3f570f glsl: Allow redeclaration of gl_Color and its variants in GLSL 1.30
Allow redeclaration of the following built-in variables with an
interpolation qualifier in language versions >= 1.30:
   * gl_FrontColor
   * gl_BackColor
   * gl_FrontSecondaryColor
   * gl_BackSecondaryColor
   * gl_Color
   * gl_SecondaryColor

See section 4.3.7 of the GLSL 1.30 spec.
2011-01-04 10:49:10 -08:00
Chad Versace 4a62a1c366 glsl: Comment ast_type_qualifier.flags 2011-01-04 10:49:10 -08:00
Eric Anholt b7b2791c6b intel: When validating an FBO's combined depth/stencil, use the given FBO.
We were looking at the current draw buffer instead to see whether the
depth/stencil combination matched.  So you'd get told your framebuffer
was complete, until you bound it and went to draw and we decided that
it was incomplete.
2011-01-04 10:04:19 -08:00
Eric Anholt 0ea49380e2 intel: Fix segfaults from trying to use _ColorDrawBuffers in FBO validation.
The _ColorDrawBuffers is a piece of computed state that gets for the
current draw/read buffers at _mesa_update_state time.  However, this
function actually gets used for non-current draw/read buffers when
checking if an FBO is complete from the driver's perspective.  So,
instead of trying to just look at the attachment points that are
currently referenced by glDrawBuffers, look at all attachment points
to see if they're driver-supported formats.  This appears to actually
be more in line with the intent of the spec, too.

Fixes a segfault in my upcoming fbo-clear-formats piglit test, and
hopefully bug #30278
2011-01-04 10:04:15 -08:00
Christoph Bumiller cd1cf78828 Merge remote branch 'origin/nvc0' 2011-01-04 18:20:05 +01:00
Brian Paul c94996f057 st/mesa: skip glDrawPixels/glBitmap-related code for ES build
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32560
2011-01-04 08:28:17 -07:00
Christoph Bumiller 4884ca5f67 nvc0: fix index size method value for u8 indices 2011-01-04 16:16:52 +01:00
Christoph Bumiller 2f08d872b2 nvc0: set the correct FP header bit for multiple colour outputs 2011-01-04 16:14:58 +01:00
Christoph Bumiller 6de94e1012 nvc0: delete memory caches and fence on screen destruction 2011-01-04 16:14:46 +01:00
Christoph Bumiller 471025929c nvc0: use mov instead of ld for scalar const loads 2011-01-04 16:14:42 +01:00
Christoph Bumiller c024c1d75f nvc0: fix resource unmap after vertex push 2011-01-04 16:14:38 +01:00
Christoph Bumiller e1e29395df nvc0: use the proper typed opcodes in constant folding 2011-01-04 16:14:33 +01:00
Christoph Bumiller 92caa65c24 nvc0: demagic GP invocation count bitfield 2011-01-04 16:14:26 +01:00
Christoph Bumiller 997f84ff4e nvc0: rewrite the 9097 GRAPH macros 2011-01-04 16:13:42 +01:00
Brian Paul 6a102074bb i965g: include brw_types.h instead of GL/gl.h
Alternately, some search&replace could be used to replace all
occurances of GLint with int, etc. in the driver.
2011-01-04 07:24:38 -07:00
Brian Paul c8a6a8bf2c osmesa: pass context to _mesa_update_framebuffer_visual()
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32814
2011-01-04 07:13:52 -07:00
Vinson Lee 90b7a4cc1a llvmpipe: Include p_compiler.h in lp_scene_queue.h.
Include p_compiler.h for boolean symbol.
2011-01-04 01:08:47 -08:00
Vinson Lee f67dad7b82 llvmpipe: Include p_compiler.h in lp_perf.h.
Include p_compiler.h for int64_t symbol.
2011-01-04 01:01:18 -08:00
Vinson Lee c72eb72ca6 llvmpipe: Include missing headers in lp_bld_depth.h
Include p_compiler.h for boolean symbol.
Include p_state.h for pipe_stencil_state symbol.
2011-01-04 00:54:14 -08:00
Vinson Lee deb9a6ae79 llvmpipe: Include p_compiler.h in lp_bld_alpha.h.
Include p_compiler.h for boolean symbol.
Add forward declaration for gallivm_state struct.
2011-01-04 00:50:48 -08:00
Vinson Lee 7bfc54ea5d i965g: Include p_compiler.h in intel_decode.h.
Include p_compiler.h for uint32_t symbol.
2011-01-04 00:44:23 -08:00
Vinson Lee cf15e9b343 i965g: Include gl.h in intel_structs.h.
Include gl.h for OpenGL symbols.
2011-01-04 00:41:10 -08:00
Zhenyu Wang bea6539abf i965: Use last vertex convention for quad provoking vertex on sandybridge
Until we know how hw converts quads to polygon in beginning of
3D pipeline, for now unconditionally use last vertex convention.

Fix glean/clipFlat case.
2011-01-04 15:56:26 +08:00
Vinson Lee 9095947fa7 mesa: Include mtypes.h in renderbuffer.h.
Include mtypes.h for gl_buffer_index symbol.

This is a follow-up to commit 65da73c5f8.
2011-01-03 22:42:12 -08:00
Zhenyu Wang 1df795f958 i965: Correct comment for gen6 fb write control message setting
Remove incorrect headless comment for gen6 fb write message.
Note current SIMD16 mode has already done right for control message.
2011-01-04 13:57:16 +08:00
Zhenyu Wang 9977297ad9 i965: Fix provoking vertex select in clip state for sandybridge
Triangle fan provoking vertex for first convention should be
'vertex 1' in sandybridge clip state.

Partly fix glean/clipFlat case
2011-01-04 13:51:39 +08:00