OSDN Git Service
Eric Anholt [Tue, 12 Jul 2011 22:31:39 +0000 (15:31 -0700)]
i915: Add support for gl_FragData[0] for output color.
We advertised ARB_draw_buffers, but either fell back to software when
using this output, or assertion failed. Fixes glsl-fs-fragdata-1, and
failures in some webgl conformance tests.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39024
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34906
(cherry picked from commit
556a47a2621073185be83a0a721a8ba93392bedb)
Eric Anholt [Mon, 11 Jul 2011 23:50:06 +0000 (16:50 -0700)]
i915: Fix NPOT compressed textures on 915.
We were failing at rounding, misplacing the non-baselevels. Fixes:
3DFX_texture_compression_FXT1/fbo-generate-mipmaps
ARB_texture_compression/fbo-generate-mipmaps
EXT_texture_compression_s3tc/fbo-generate-mipmaps
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
f2fd0d63046c41559c5dfca9ebdc5d33c0ae4177)
Eric Anholt [Mon, 11 Jul 2011 18:32:04 +0000 (11:32 -0700)]
i915: Fix map/unmap mismatches from leaving INTEL_FALLBACK during TNL.
The first rendering after context create didn't know of the color
buffer yet, triggering a sw fallback. The intel_prepare_render() from
intelSpanRenderStart then found the buffer and turned off fallbacks,
but intelSpanRenderFinish was never called and things were left
mapped. By checking buffers before making the call on whether to do
the fallback pipeline or not, we avoid the fallback change inside of
the rendering pipeline.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31561
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
6e6b38860488a0b2b282866f095cea9860503a14)
Eric Anholt [Fri, 8 Jul 2011 00:08:04 +0000 (17:08 -0700)]
i965: Fix fp-dst-aliasing-[12].vpfp.
There's no pretty way to avoid the overwriting of the src operands, so
just use a temporary destination and rely on the MOV optimization.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
46a7639174d2c55c30ec24b179cbef059fb3ca43)
Eric Anholt [Thu, 7 Jul 2011 23:41:20 +0000 (16:41 -0700)]
i965: Fix fp-lit-src-equals-dst.
We were stomping over the source for the body of the LIT instruction
when doing the MOV of 1.0 to the uninteresting channels.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
e3ea5bc08e32119d05bce543c07c61ce93869e60)
Eric Anholt [Wed, 29 Jun 2011 18:37:35 +0000 (11:37 -0700)]
intel: Remove gratuitous context checks in intel_delete_renderbuffer().
Even if we don't have a current context, if we're freeing the rb we
should free its region (and BO). The renderbuffer unreference checks
appear to be just cargo-cult from the region unreference code.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30217
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
007c2d6cd2f6b206564689ac12a3e51aaae242bc)
Eric Anholt [Wed, 29 Jun 2011 18:09:49 +0000 (11:09 -0700)]
intel: Allow intel_region_reference() with *dst != NULL.
This should help us avoid leaking regions in region reference code by
making the API more predictable.
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
036b74a7f8adc745c7af089129f070b8e5b8f4bd)
(cherry picked from commit
d8f65c07e9f3a5948c8bee95482bcab651b33c01)
Eric Anholt [Wed, 6 Jul 2011 04:59:33 +0000 (21:59 -0700)]
glsl: Fix make clean for dricore.
(cherry picked from commit
abbbd14dd440cfbbe8b42279cf95c30eec5b495d)
Eric Anholt [Sun, 19 Jun 2011 19:04:46 +0000 (12:04 -0700)]
i965: Reissue PIPELINE_POINTERS and BINDING_TABLE_POINTERS on SBA change.
This was a requirement we didn't run into until we started using
STATE_BASE_ADDRESS for instruction data.
(cherry picked from commit
a09c5c2e3053c48a33134cf28229105bfef52e6f)
Eric Anholt [Sun, 19 Jun 2011 18:33:40 +0000 (11:33 -0700)]
i965/gen6: Fix scissors using invalid STATE_BASE_ADDRESS.
The scissor state was incorrectly in a .prepare function instead of
.emit, so the packet would end up in the batch before the
STATE_BASE_ADDRESS. It appears that this doesn't actually hurt, as
the scissor address gets dereferenced according to the current SBA at
draw time.
(cherry picked from commit
cd7bfd5d44f543246faa7ad6ff2f8309189be963)
Stéphane Marchesin [Wed, 13 Jul 2011 18:59:10 +0000 (11:59 -0700)]
i915g: don't try to check if a NULL buffer is busy.
Alex Deucher [Tue, 12 Jul 2011 16:00:10 +0000 (12:00 -0400)]
r600g: emit SQ_LDS_RESOURCE_MGMT
Need to be initialized to a reasonable value as
compute code may change it.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=39119
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Brian Paul [Mon, 11 Jul 2011 14:00:59 +0000 (08:00 -0600)]
glx: add a few missing glXChooseFBConfig() attributes
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38842
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
d60880db35fd11d9348ce4b2bfbcc9325d2ebf91)
Brian Paul [Fri, 8 Jul 2011 18:59:20 +0000 (12:59 -0600)]
glext.h: update to version 71
(cherry picked from commit
bb0d5cae002f288f822dc9c90e6cd4eaf660c464)
Benjamin Franzke [Sat, 2 Jul 2011 11:46:42 +0000 (13:46 +0200)]
configure: Require libudev for drm & wayland egl platforms
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
7ed1826e2e2a5b5c4840821c92ef7273efe32e24)
Benjamin Franzke [Sat, 2 Jul 2011 11:46:09 +0000 (13:46 +0200)]
configure: Fix typo in gbm check for egl drm platform
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
9b8cd499303d9bcb60f40ef14553cb38cea6a897)
Benjamin Franzke [Sat, 2 Jul 2011 11:45:14 +0000 (13:45 +0200)]
configure: Enable st/gbm if st/egl has drm platform
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
b18b2994eff2f51588abe29c7a2209220c9ee9c5)
Benjamin Franzke [Sat, 2 Jul 2011 11:41:35 +0000 (13:41 +0200)]
egl_dri2: Fix compilation if udev devel files are not installed
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
b2d6375e6a64ac12f35f8a611ebf2016e4a6dd42)
Benjamin Franzke [Mon, 27 Jun 2011 08:23:34 +0000 (10:23 +0200)]
egl: Fix Terminate with shared gbm screens
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
992680c8b46d72cbc61888b8439d815bff42986c)
Marek Olšák [Sun, 10 Jul 2011 18:03:05 +0000 (20:03 +0200)]
swrast: fix depth/stencil blits when there's no colorbuffer
NOTE: This is a candidate for the 7.10 and 7.11 branches.
(cherry picked from commit
d1214cca084f277b5acc913490d354edbd4b990f)
Marek Olšák [Sun, 10 Jul 2011 18:01:33 +0000 (20:01 +0200)]
mesa: return early if mask is cleared to zero in BlitFramebuffer
From ARB_framebuffer_object:
If a buffer is specified in <mask> and does not exist in both the
read and draw framebuffers, the corresponding bit is silently
ignored.
(cherry picked from commit
83478e5d5944e1fc320e8cfb10ba75055bbea3fd)
Vadim Girlin [Sat, 9 Jul 2011 15:39:43 +0000 (19:39 +0400)]
r600g: LIT: clamp negative src.y to 0
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39083
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Eric Anholt [Fri, 8 Jul 2011 22:30:48 +0000 (15:30 -0700)]
i965/gen4: Fix GPU hangs since the program streaming change.
This was tricky. We were doing a use-before-initialize of
grf_reg_count, but the value usually got overwritten anyway -- when we
didn't have to do a relocation (typical), or on gen5 when we didn't
have relocations at all.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38771
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
d03fdc4cdefdfdc5b59547945704c6037a5061c7)
Ian Romanick [Sat, 9 Jul 2011 01:47:21 +0000 (18:47 -0700)]
mesa: Fix the parsers build rule so that 'make tarballs' can work
You'd think that with all the commit messages about adding stuff to
tarballs or fixing 'make tarballs' that someone would have noticed
that it was completely broken for 4 months (
3158cc7).
Ian Romanick [Sat, 9 Jul 2011 01:26:39 +0000 (18:26 -0700)]
mesa: Bump version to 7.11-rc1
Ian Romanick [Thu, 2 Jun 2011 19:42:48 +0000 (12:42 -0700)]
glsl: Fix depth unbalancing problem in if-statement flattening
Previously, if max_depth were 1, the following code would see the
first if-statement (correctly) not get flattened, but the second
if-statement would (incorrectly) get flattened:
void main()
{
if (a)
gl_Position = vec4(0);
if (b)
gl_Position = vec4(1);
}
This is because the visit_leave(ir_if*) method would not decrement the
depth before returning on the first if-statement.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
d2c6cef18aa37d197eb323a0795969d271d02819)
Vadim Girlin [Fri, 8 Jul 2011 02:19:37 +0000 (06:19 +0400)]
r600g: introduce r600_bc_src_toggle_neg helper and fix SUB & LRP
SUB & LRP instructions should toggle NEG bit instead of setting it,
otherwise e.g. "SUB a,b,-1" is translated as "ADD a,b,-1"
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Fri, 8 Jul 2011 02:19:36 +0000 (06:19 +0400)]
r600g: introduce r600_bc_src_set_abs helper and fix LOG
LOG instruction should use absolute values of source operand.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Wed, 6 Jul 2011 01:29:09 +0000 (05:29 +0400)]
r600g: RSQ: clear NEG for operand
Need to clear NEG bit because it applies after ABS, e.g. "RSQ ..., -1"
uses -|1| as operand.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Wed, 6 Jul 2011 01:29:08 +0000 (05:29 +0400)]
r600g: LIT: swap MUL_LIT operands to fix 0^0
For 0^0 case result of "LOG_CLAMPED ...,0" is -MAX_FLOAT, and then result of
"MUL_LIT ...,0,-MAX_FLOAT,..." is -MAX_FLOAT instead of 0 because of special
src1 checks for -MAX_FLOAT. So swap src0/1:
"MUL_LIT ...,-MAX_FLOAT,0,..." to get expected 0, then result of
"EXP_IEEE ...,0" is 1 as expected for LIT.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Brian Paul [Thu, 7 Jul 2011 22:47:59 +0000 (16:47 -0600)]
glsl: use casts to silence warning
(cherry picked from commit
7eb7d67d50fccb64248d1fc6f490895048d7d32e)
Brian Paul [Fri, 8 Jul 2011 14:03:40 +0000 (08:03 -0600)]
gallivm: Fix build with llvm-3.0
LLVM 3.0svn changes pretty rapidly. The change in
Target->createMCInstPrinter() signature which inspired commits
40ae214067673edbda79371969d1730b6194d83e and
92e29dc5b0474c073b0f05d60629fc6c3decfca4 has been reverted.
Signed-off-by: Gustaw Smolarczyk <wielkiegie@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
fc98444bd58960e6cab28423365923bc7e7af3e1)
Conflicts:
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
Marek Olšák [Mon, 27 Jun 2011 16:57:59 +0000 (18:57 +0200)]
st/mesa: handle float formats in st_format_datatype
NOTE: This is a candidate for the 7.11 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
7de28e80dcd4239a780b0f5fdc6e61e6e56a68aa)
Marek Olšák [Mon, 27 Jun 2011 17:01:25 +0000 (19:01 +0200)]
st/mesa: use the first non-VOID channel in st_format_datatype
Otherwise PIPE_FORMAT_X8B8G8R8_UNORM and friends would fail.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
292148dc4b18958d4447df7596311bd2f09fd44f)
Stéphane Marchesin [Wed, 6 Jul 2011 09:19:48 +0000 (02:19 -0700)]
i915g: Improve flushing using heuristics.
Stéphane Marchesin [Mon, 4 Jul 2011 02:43:19 +0000 (19:43 -0700)]
i915g: Move back to the old method for target format fixup.
Conflicts:
src/gallium/drivers/i915/i915_state_emit.c
Eric Anholt [Wed, 6 Jul 2011 18:31:00 +0000 (11:31 -0700)]
intel: Fix use of freed buffer if glBitmap is called after a swap.
Regions looked up from the framebuffer are invalid after
intel_prepare_render().
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30266
Tested-by: Thomas Jones <thomas.jones@utoronto.ca>
(cherry picked from commit
066bee64e1611093c7e641ba77bbd43f70d08cec)
Paul Berry [Tue, 28 Jun 2011 16:42:24 +0000 (09:42 -0700)]
glsl: permit explicit locations on fragment shader outputs, not inputs
From the OpenGL docs for GL_ARB_explicit_attrib_location:
This extension provides a method to pre-assign attribute locations to
named vertex shader inputs and color numbers to named fragment shader
outputs.
This was accidentally implemented for fragment shader inputs. This
patch fixes it to apply to fragment shader outputs.
Fixes piglit tests
spec/ARB_explicit_attrib_location/1.{10,20}/compiler/layout-{01,03,06,07,08,09,10}.frag
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624
(cherry picked from commit
b078aad8ab22d840456688480a8c27d4664297ce)
Ian Romanick [Tue, 28 Jun 2011 00:59:58 +0000 (17:59 -0700)]
linker: Assign locations for fragment shader output
Fixes an assertion failure in the piglib out-01.frag
ARB_explicit_attrib_location test. The locations set via the layout
qualifier in fragment shader were not being applied to the shader
outputs. As a result all of these variables still had a location of
-1 set.
This may need some more work for pre-3.0 contexts. The problem is
dealing with generic outputs that lack a layout qualifier. There is
no way for the application to specify a location
(glBindFragDataLocation is not supported) or query the location
assigned by the linker (glGetFragDataLocation is not supported).
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Vinson Lee <vlee@vmware.com>
(cherry picked from commit
d32d4f780f9dad122adb63086da266aec6e88850)
Ian Romanick [Sat, 25 Jun 2011 00:30:41 +0000 (17:30 -0700)]
glsl: Don't choke when printing an anonymous function parameter
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
174cef7fee7d400fc89a3ce68b7791d2aa3eb90f)
Ian Romanick [Sat, 25 Jun 2011 00:12:31 +0000 (17:12 -0700)]
ir_to_mesa: Allocate temporary instructions on the visitor's ralloc context
And don't delete them. Let ralloc clean them up. Deleting the
temporary IR leaves dangling references in the prog_instruction. That
results in a bad dereference when printing the IR with MESA_GLSL=dump.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
dbda466fc05a6262ba857a7887e16347cf3d3e96)
Ian Romanick [Mon, 27 Jun 2011 23:33:13 +0000 (16:33 -0700)]
glsl: Track initial mask in constant propagation live set
The set of values initially available (before any kills) must be
tracked with each constant in the set. Otherwise the wrong component
can be selected after earlier components have been killed.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37383
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Matthias Bentrup <matthias.bentrup@googlemail.com>
(cherry picked from commit
0eb97979584b73907327eebc547302e6b8d8976a)
Vadim Girlin [Mon, 4 Jul 2011 14:30:42 +0000 (18:30 +0400)]
r600g: fix buffer overflow check in r600_query_begin
Vadim Girlin [Mon, 4 Jul 2011 14:30:41 +0000 (18:30 +0400)]
r600g: fix bo map usage flags in r600_query_begin
Vadim Girlin [Mon, 4 Jul 2011 14:30:40 +0000 (18:30 +0400)]
r600g: reduce flushes for queries
Vadim Girlin [Mon, 4 Jul 2011 14:30:39 +0000 (18:30 +0400)]
r600g: fix buffer offset in r600_query_begin
Chia-I Wu [Sat, 2 Jul 2011 08:57:30 +0000 (17:57 +0900)]
egl: add copyright notices
The list of copyright holders could be incomplete. Please update
directly or notify me if your name is missing.
(cherry picked from commit
f2001df508fda599a18b3586d2775e970a3db13a)
Vadim Girlin [Wed, 29 Jun 2011 12:29:18 +0000 (16:29 +0400)]
r600g: fix check for empty cs
Chia-I Wu [Thu, 30 Jun 2011 01:23:50 +0000 (10:23 +0900)]
target/egl-static: fix a compiler warning
(cherry picked from commit
3e3df5fcd19671260fdd983e1ebfaca7826242a6)
Chia-I Wu [Tue, 28 Jun 2011 06:23:20 +0000 (15:23 +0900)]
targets/egl-static: fix library search order
Use
$(MKLIB) -ldflags '-L$(TOP)/$(LIB_DIR)'
instead of
$(MKLIB) -L$(TOP)/$(LIB_DIR)
to make sure the local library path appears before system's.
(cherry picked from commit
24137afb315007c4e686b494d4565c5bd3d2d97f)
Chia-I Wu [Sat, 25 Jun 2011 22:36:26 +0000 (07:36 +0900)]
targets/gbm: attemp to fix unresolved symbols
Move system libraries (usually .so) out of --start-group / --end-group
pair. Add possiblly missing archives, defines, and shared libraries.
(cherry picked from commit
56ec8e17d3a132cd43a3d75a653a034b05cbd918)
Chia-I Wu [Sat, 25 Jun 2011 09:09:18 +0000 (18:09 +0900)]
targets/egl-static: do not use DRI_LIB_DEPS
It brings in libraries that are not necessarily needed.
(cherry picked from commit
1e9f0b17365072ef672a7777fddde9d973530581)
Chia-I Wu [Sat, 25 Jun 2011 09:28:20 +0000 (18:28 +0900)]
egl: fix EGL_MATCH_NATIVE_PIXMAP
EGL_MATCH_NATIVE_PIXMAP is valid for eglChooseConfig, but invalid for
eglGetConfigAttrib.
(cherry picked from commit
8ea5330200e314f9f7de763b1951656c92caa857)
Chia-I Wu [Tue, 28 Jun 2011 01:22:01 +0000 (10:22 +0900)]
st/egl: update fbdev backend
Considering fbdev as an in-kernel window system,
- opening a device opens a connection
- there is only one window: the framebuffer
- fb_var_screeninfo decides window position, size, and even color format
- there is no pixmap
Now EGL is built on top of this window system. So we should have
- the fd as the handle of the native display
- reject all but one native window: NULL
- no pixmap support
modeset support is still around, but it should be removed soon.
(cherry picked from commit
aa281dd3924cf76e24c0e8cbd971f58d082cd4cd)
Chia-I Wu [Mon, 27 Jun 2011 02:47:27 +0000 (11:47 +0900)]
st/d3d1x: fix for st/egl native.h interface change
The interface was changed in
73df31eedd0f33c8a9907855cb247c8f87964c48.
(cherry picked from commit
3a07d9594a60dd84464b30b2d9ffdfc4f219bc5b)
Chia-I Wu [Sat, 25 Jun 2011 23:02:13 +0000 (08:02 +0900)]
st/egl: fix a compile error
It is triggered when --with-driver=xlib is specified.
(cherry picked from commit
ed47d65c7c05d7dd5a5b4cafaa32afbd4fff0bef)
Chia-I Wu [Sat, 25 Jun 2011 05:52:57 +0000 (14:52 +0900)]
st/egl: reorganize backend initialization
Remove set_event_handler() and pass the event handler with
native_get_XXX_platform(). Add init_screen() so that the pipe screen is
created later. This way we don't need to pass user_data to
create_display().
(cherry picked from commit
73df31eedd0f33c8a9907855cb247c8f87964c48)
Kenneth Graunke [Wed, 29 Jun 2011 17:53:51 +0000 (10:53 -0700)]
i965/gen7: Add missing ! to brw->gs.prog_active assertion.
A typo in commit
c173541d9769 accidentally removed the !.
It's supposed to assert that there is _not_ an active GS program.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38762
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry-picked from commit
5ddc518401ae69ad92218643f00ef50617a0f11d)
Emil Velikov [Tue, 28 Jun 2011 17:47:41 +0000 (18:47 +0100)]
st/mesa: Use correct internal target
Commit
1a339b6c(st/mesa: prefer native texture formats when possible)
introduced two new arguments to the st_choose_format() functions.
This patch fixes the order and passes the correct internal_target
rather than GL_NONE
NOTE: This is a candidate for the 7.11 branch
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
9b5c538726d279c79c1c74047fe19a6caab5321e)
Andre Maasikas [Mon, 27 Jun 2011 15:03:27 +0000 (18:03 +0300)]
st/mesa: fix overwriting gl_format with pipe_format since
9d380f48
fixes assert later on in texcompress2/r600g
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
19789e403ca3d0171d18f3c862738225902315e9)
Marek Olšák [Sat, 25 Jun 2011 05:20:20 +0000 (07:20 +0200)]
r300g: drop support for ARGB, ABGR, XRGB, XBGR render targets
Blending and maybe even alpha-test don't work with those formats.
Only supporting RGBA, BGRA, RGBX, BGRX.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
(cherry picked from commit
bc517d64dad41bc66ab5cc1c82d8d8111145d8a1)
Brian Paul [Sat, 25 Jun 2011 12:20:32 +0000 (06:20 -0600)]
Revert "Fix 24bpp software rendering"
This reverts commit
c0c0bb6cb140825f5bab3c40c0c9c0ec575fbc76.
Stéphane Marchesin [Sat, 25 Jun 2011 02:51:25 +0000 (19:51 -0700)]
i915g: always upload the vs constants.
This fixes a crash in llvm draw.
Eric Anholt [Fri, 24 Jun 2011 22:40:51 +0000 (15:40 -0700)]
i965/gen5: Fix grf_used calculation for 16-wide.
If we happened to allocate a texture result (or other vector) to the
highest hardware register slot, and we were in 16-wide, we would
under-count the registers used and potentially wrap around to g0 if
that allocation crossed a 16-register block boundary. Bad rendering
and hangs ensued.
Tested-by: Ian Romanick <idr@freedesktop.org>
Stéphane Marchesin [Sat, 25 Jun 2011 00:18:12 +0000 (17:18 -0700)]
i915g: add fake occlusion queries.
Those always return 0, but at least we don't crash when exposing GL 2.0.
Stéphane Marchesin [Fri, 24 Jun 2011 23:41:09 +0000 (16:41 -0700)]
i915g: Don't do shader fixup if no surface is bound.
Stéphane Marchesin [Fri, 24 Jun 2011 23:18:58 +0000 (16:18 -0700)]
i915g: Fix point sprites.
Brian Paul [Fri, 24 Jun 2011 00:44:42 +0000 (18:44 -0600)]
indices: fix conversion of PIPE_PRIM_POLYGON to lines
When the fill mode is PIPE_POLYGON_MODE_LINE we were basically
converting the polygon into triangles, then drawing the outline of all
the triangles. But we really only want to draw the lines around the
perimeter of the polygon, not the interior lines.
NOTE: This is a candidate for the 7.10 branch.
Paul Berry [Sun, 12 Jun 2011 17:47:46 +0000 (10:47 -0700)]
i965: fix mask used to write to clip distance registers when gen>6
In gen6 and above, clip distances 0-3 are written to message register
3's xyzw components, and 4-7 to message register 4's xyzw components.
Therefore when when writing the clip distances we need to examine the
lower 2 bits of the clip distance index to see which component to
write to.
emit_vertex_write() was examining the lower 3 bits, causing clip
distances 4-7 not to be written correctly.
Fixes piglit test vs-clip-vertex-01.shader_test
Alex Deucher [Fri, 24 Jun 2011 22:27:39 +0000 (18:27 -0400)]
r600g: limit fs_write_all shader rebuild to eg+
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Alex Deucher [Fri, 24 Jun 2011 22:05:53 +0000 (18:05 -0400)]
r600g: eg+ support for FS_COLOR0_WRITES_ALL_CBUFS
Evergreen+ don't support multi-writes so we need to emulate
it in the shader. Fixes the following piglit tests:
fbo-drawbuffers-fragcolor
ati_draw_buffers-arbfp-no-option
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Chad Versace [Thu, 23 Jun 2011 08:20:19 +0000 (01:20 -0700)]
intel: Fix workaround for _mesa_update_framebuffer
In intel_draw_buffer, there exists a workaround to prevent
_mesa_update_framebuffer from creating a swrast depth wrapper when
using separate stencil. This commit fixes the workaround, which was
incomplete for s8z24 texture renderbuffers.
Fixes fbo-blit-d24s8 on gen5 with separate stencil manually enabled.
Signed-off-by: Chad Versace <chad@chad-versace.us>
Chad Versace [Thu, 23 Jun 2011 00:52:22 +0000 (17:52 -0700)]
intel: Change framebuffer validation criteria
Since all infrastructure is now in place to support packed
depth/stencil renderbuffers when using separate stencil, there is no
need for special cases when separate stencil is enabled.
Signed-off-by: Chad Versace <chad@chad-versace.us>
Chad Versace [Thu, 23 Jun 2011 02:44:53 +0000 (19:44 -0700)]
intel: In intel_update_wrapper, support s8z24 textures when using separate stencil
Also, in order to coerce intel_update_tex_wrapper_regions() to
allocate the hiz region, alter intel_update_tex_wrapper_regions() to
examine the renderbuffer format instead of the texture image format.
Signed-off-by: Chad Versace <chad@chad-versace.us>
Chad Versace [Wed, 22 Jun 2011 23:08:49 +0000 (16:08 -0700)]
intel: Factor region updates out of intel_update_wrapper
... and into new function intel_update_tex_wrapper_regions.
This prevents code duplication in the next commit.
Also add a note explaining that the hiz region is broken for mipmapped
depth textures.
Signed-off-by: Chad Versace <chad@chad-versace.us>
Chad Versace [Tue, 21 Jun 2011 22:54:27 +0000 (15:54 -0700)]
intel: During glTexImage, allocate renderbuffers for faking s8z24 textures
... when using separate stencil.
Define function intel_tex_image_x8z24_create_renderbuffers and call it
in intelTexImage after the miptree has been created and filled with data.
Signed-off-by: Chad Versace <chad@chad-versace.us>
Chad Versace [Wed, 22 Jun 2011 17:26:26 +0000 (10:26 -0700)]
intel: Declare some functions in intel_fbo.c as non-static
... because they will be needed by intel_tex_image_s8z24_create_renderbuffers.
Redeclared functions are:
intel_alloc_renderbuffer_storage
intel_renderbuffer_set_draw_offsets
Signed-off-by: Chad Versace <chad@chad-versace.us>
Chad Versace [Tue, 21 Jun 2011 21:06:13 +0000 (14:06 -0700)]
intel: Change signature of intel_create_wrapped_renderbuffer
Redeclare as non-static because
intel_tex_image_s8z24_create_renderbuffers will use it.
Remove the 'wrapper' parameter, because there is no wrapper for
intel_texture_image.depth_rb and stencil_rb.
Signed-off-by: Chad Versace <chad@chad-versace.us>
Chad Versace [Wed, 22 Jun 2011 04:42:48 +0000 (21:42 -0700)]
intel: Perform gather on s8z24 texture images during glGetTexImage
Signed-off-by: Chad Versace <chad@chad-versace.us>
Chad Versace [Wed, 22 Jun 2011 05:58:39 +0000 (22:58 -0700)]
intel: Define functions intel_texture_s8z24_scatter/gather
... which copy the stencil bits between intel_image->depth_rb and
intel_image->stencil_rb.
Signed-off-by: Chad Versace <chad@chad-versace.us>
Chad Versace [Tue, 21 Jun 2011 20:44:57 +0000 (13:44 -0700)]
intel: Add fields to intel_texture for faking s8z24 with separate stencil
Add the fields depth_rb and stencil_rb, and put hooks in place to
release the renderbuffers in intelFreeTextureImageData and
intelTexImage.
Signed-off-by: Chad Versace <chad@chad-versace.us>
Stéphane Marchesin [Fri, 24 Jun 2011 21:07:31 +0000 (14:07 -0700)]
st/mesa: add PIPE_FORMAT_R8G8B8A8_UNORM as the first RGBA format.
Otherwise we can end up creating RGBA render targets (which are BGRA on the
hardware), and then we bind them as RGBA textures (which are RGBA on the
hardware). This generates software fallbacks every time we bind the frame as
a texture.
Marek Olšák [Tue, 21 Jun 2011 03:08:28 +0000 (05:08 +0200)]
mesa: don't allocate memory in _mesa_unpack_depth_span if we don't need it
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Tue, 21 Jun 2011 03:07:53 +0000 (05:07 +0200)]
mesa: fix a memory leak in _mesa_unpack_depth_span
NOTE: This is a candidate for the 7.10 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Tue, 21 Jun 2011 03:10:26 +0000 (05:10 +0200)]
mesa: fix texstore of DEPTH24_STENCIL8 if srcFormat is STENCIL_INDEX
NOTE: This is a candidate for the 7.10 branch.
Marek Olšák [Wed, 1 Jun 2011 13:10:27 +0000 (15:10 +0200)]
mesa: remove unused function _mesa_new_depthstencil_renderbuffer
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 24 Jun 2011 19:59:33 +0000 (13:59 -0600)]
st/mesa: fix pipe_get_transfer() call in fallback_copy_texsubimage()
Commit
1a339b6c71ebab6e1a64f05b2e133022d3bbcd15 caused us to take
a different path through the glCopyTexSubImage() code. The
pipe_get_transfer() call neglected to pass the texture's level, face
and slice info. So we were always transferring from the 0th mipmap
level even when the source renderbuffer was a non-zero mipmap level
in a texture.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38649
NOTE: This is a candidate for the 7.10 branch.
Benjamin Franzke [Fri, 24 Jun 2011 19:45:05 +0000 (21:45 +0200)]
egl_dri2: Build drm platform only if enabled
Vadim Girlin [Fri, 24 Jun 2011 16:29:13 +0000 (20:29 +0400)]
r600g: implement fragment and vertex color clamp
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38440
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Fri, 24 Jun 2011 16:29:12 +0000 (20:29 +0400)]
r600g: optimize spi update
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Fri, 24 Jun 2011 16:29:11 +0000 (20:29 +0400)]
r600g: LIT: fix x&y slots order
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Eric Anholt [Wed, 22 Jun 2011 00:38:20 +0000 (17:38 -0700)]
i965: Make the brw_format_for_mesa_format table static const.
Once again, assuming the compiler is clever works out so poorly. The
generated code initialized the structure on the stack, then did a
lookup into it. This was a performance regression from
70c6cd39bd9396b0d3f9e84df41fd8bef1f26cc4.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 22 Jun 2011 00:02:14 +0000 (17:02 -0700)]
i965: Don't bother telling swrast_setup about state updates until fallback.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Tue, 21 Jun 2011 23:52:51 +0000 (16:52 -0700)]
i965: Don't bother telling tnl about state updates unless we fall back.
This was sucking up 1% of the CPU on 3DMMES.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Sat, 26 Feb 2011 10:01:37 +0000 (02:01 -0800)]
i965: Reuse existing program data when a new compiled program matches.
It's common in applications just before the advent of
EXT_separate_shader_objects to have multiple linked shaders with the
same VS or FS. While we aren't detecting those at the Mesa level, we
can detect when our compiled output happens to match an existing
compiled program.
This patch was created after noting the incredible amount of compiled
program data generated by Heroes of Newerth. It reduces the program
data in use at the start menu (replayed by apitrace) from 828kb to
632kb, and reduces CACHE_NEW_WM_PROG state flagging by 3/4. It
doesn't impact our rate of hardware state changes yet, because things
depending on CACHE_NEW_WM_PROG also depend on BRW_NEW_FRAGMENT_PROGRAM
which is still being flagged.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Fri, 24 Jun 2011 16:41:42 +0000 (10:41 -0600)]
st/mesa: fix all_varyings_in_vbos() regression
Fixes regression from
d631c19db47181129811080bfa772b210d762d4d.
See http://bugs.freedesktop.org/show_bug.cgi?id=38626
Marc Pignat [Fri, 24 Jun 2011 13:19:32 +0000 (15:19 +0200)]
Fix 24bpp software rendering
This patch add the support for 24bpp in the dri/swrast implementation.
Signed-off-by: Marc Pignat <marc@pignat.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 24 Jun 2011 15:01:33 +0000 (09:01 -0600)]
gallium/tests/trivial: update comment
Brian Paul [Fri, 24 Jun 2011 15:00:57 +0000 (09:00 -0600)]
gallium/tests/trivial: use CXX to do final link
Alon Levy [Wed, 22 Jun 2011 12:31:11 +0000 (14:31 +0200)]
gallium/tests/trivial: make it build
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Brian Paul <brianp@vmware.com>