mesa.git
15 years agoglapi: Fix a possible race in getting current context/dispatch.
Chia-I Wu [Fri, 10 Jul 2009 07:28:55 +0000 (15:28 +0800)]
glapi: Fix a possible race in getting current context/dispatch.

There is a possbile race that _glapi_Context is reset by another thread
after it is tested in GET_CURRENT_CONTEXT but before it is returned.  We
definitely do not want a lock here to solve the race.  To have correct
results even under a race, no other threads should reset _glapi_Context
(or _glapi_Dispatch).

This patch adds a new global variable _glapi_SingleThreaded.  Since
_glapi_Context or _glapi_Dispatch are no longer reset,
_glapi_SingleThreaded is tested instead, before accessing them.

DRI drivers compiled with this patch applied will not work with existing
libGL.so because of the missing new symbol.  If this turns out to be a
real problem, this patch should be reverted.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoglapi: Static mutex does not work on WIN32_THREADS.
Chia-I Wu [Tue, 14 Jul 2009 05:17:25 +0000 (13:17 +0800)]
glapi: Static mutex does not work on WIN32_THREADS.

This re-introduces the race in _glapi_check_multithread, but avoids a
crash on windows.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoglapi: Fix a race in accessing context/dispatch TSD.
Chia-I Wu [Fri, 10 Jul 2009 09:35:11 +0000 (17:35 +0800)]
glapi: Fix a race in accessing context/dispatch TSD.

If multiple threads set/get a TSD at roughly same time for the first
time, glthread might (wrongly) initialize it more than once.  This patch
solves the race by initializing context/dispatch TSDs early.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoglapi: Protect _glapi_check_multithread by a mutex.
Chia-I Wu [Fri, 10 Jul 2009 07:21:42 +0000 (15:21 +0800)]
glapi: Protect _glapi_check_multithread by a mutex.

Multiple threads might call _glapi_check_multithread at roughly the same
time.  It is possbile that all of them are wrongly regarded as firstCall
if there is no mutex.  This bug causes xeglthreads to crash sometimes.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoglsl: Silence gcc uninitialized variable warning.
Vinson Lee [Mon, 24 Aug 2009 17:43:02 +0000 (11:43 -0600)]
glsl: Silence gcc uninitialized variable warning.

15 years agomesa: _mesa_layout_parameters() returns a boolean value
Brian Paul [Mon, 24 Aug 2009 16:50:07 +0000 (10:50 -0600)]
mesa: _mesa_layout_parameters() returns a boolean value

15 years agoradeon: Add debug output to radeonCountStateEmitSize.
Pauli Nieminen [Mon, 24 Aug 2009 15:44:53 +0000 (18:44 +0300)]
radeon: Add debug output to radeonCountStateEmitSize.

15 years agor600: Fix indetion and add useful debug output.
Pauli Nieminen [Mon, 24 Aug 2009 15:06:25 +0000 (18:06 +0300)]
r600: Fix indetion and add useful debug output.

15 years agoMerge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict
Pauli Nieminen [Mon, 24 Aug 2009 14:09:27 +0000 (17:09 +0300)]
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict

15 years agor300: add support for EXT_framebuffer_blit
Maciej Cencora [Mon, 24 Aug 2009 12:52:33 +0000 (14:52 +0200)]
r300: add support for EXT_framebuffer_blit

15 years agotgsi: Fix build error due to commit acc7da90
Cooper Yuan [Mon, 24 Aug 2009 11:50:38 +0000 (19:50 +0800)]
tgsi: Fix build error due to commit acc7da90

15 years agotgsi: Only free temp uregs.
José Fonseca [Mon, 24 Aug 2009 10:40:56 +0000 (11:40 +0100)]
tgsi: Only free temp uregs.

Shorthand.
(cherry picked from commit de911220bbbe74cff0c79b260456ff36122b7b5b)

15 years agotgsi: Pass pipe_context as a parameter to ureg_create_shader.
José Fonseca [Mon, 24 Aug 2009 10:40:29 +0000 (11:40 +0100)]
tgsi: Pass pipe_context as a parameter to ureg_create_shader.

Simplifies migration to tgsi_ureg.
(cherry picked from commit f574398c07c41cb8d31249a7186fc178ef7d552a)

15 years agotgsi: add generic instruction builder
Keith Whitwell [Mon, 24 Aug 2009 10:32:06 +0000 (11:32 +0100)]
tgsi: add generic instruction builder

When translating an incoming shader (rather than building one from scratch)
it's preferable to be able to call a single, generic instruction emitter
rather than figuring out which of the opcode-specific functions to call.

15 years agor300g: Set the vector address in the input memory for bypass_vs_clip_and_viewport...
Cooper Yuan [Mon, 24 Aug 2009 05:56:23 +0000 (13:56 +0800)]
r300g: Set the vector address in the input memory for bypass_vs_clip_and_viewport case

15 years agor600: scissor updates for dri2
Dave Airlie [Mon, 24 Aug 2009 04:56:40 +0000 (00:56 -0400)]
r600: scissor updates for dri2

Pulled from Dave's WIP patch.

15 years agor600: switch to common cs functions
Dave Airlie [Mon, 24 Aug 2009 04:47:34 +0000 (00:47 -0400)]
r600: switch to common cs functions

needed for dri2.  Pulled from Dave's WIP patch.

15 years agor600: map 16 VS outputs
Alex Deucher [Mon, 24 Aug 2009 04:33:33 +0000 (00:33 -0400)]
r600: map 16 VS outputs

Should cover everything exported from the VS

15 years agor600: fix logic copy paste error
Alex Deucher [Mon, 24 Aug 2009 03:56:45 +0000 (23:56 -0400)]
r600: fix logic copy paste error

Spotted by airlied.

15 years agor600: Improve emit prediction.
Pauli Nieminen [Sun, 23 Aug 2009 23:44:27 +0000 (02:44 +0300)]
r600: Improve emit prediction.

15 years agor600: Predict emit size for next rendering.
Pauli Nieminen [Sun, 23 Aug 2009 23:01:15 +0000 (02:01 +0300)]
r600: Predict emit size for next rendering.

15 years agoradeon: Fix dri1 ctx emit size.
Pauli Nieminen [Sun, 23 Aug 2009 22:54:01 +0000 (01:54 +0300)]
radeon: Fix dri1 ctx emit size.

15 years agoMerge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict
Pauli Nieminen [Sun, 23 Aug 2009 21:57:05 +0000 (00:57 +0300)]
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict

Conflicts:
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/radeon/radeon_cmdbuf.h

15 years agoradeon: add radeon_cs_write_table to the legacy path
Alex Deucher [Sun, 23 Aug 2009 20:22:01 +0000 (16:22 -0400)]
radeon: add radeon_cs_write_table to the legacy path

15 years agor600: bump reloc_chunk size
Alex Deucher [Sun, 23 Aug 2009 20:06:31 +0000 (16:06 -0400)]
r600: bump reloc_chunk size

This fixes openarena reloc errors.  This needs to be
made more dynamic.

15 years agor600: fix count for CB/DB target state
Alex Deucher [Sun, 23 Aug 2009 19:32:42 +0000 (15:32 -0400)]
r600: fix count for CB/DB target state

15 years agor300: fix a typo
Maciej Cencora [Sun, 23 Aug 2009 19:11:55 +0000 (21:11 +0200)]
r300: fix a typo

15 years agoradeon: use proper macro
Maciej Cencora [Sun, 23 Aug 2009 19:11:13 +0000 (21:11 +0200)]
radeon: use proper macro

15 years agoradeon: use bo_is_idle interface for checking if OQ result is available
Maciej Cencora [Sun, 23 Aug 2009 19:02:12 +0000 (21:02 +0200)]
radeon: use bo_is_idle interface for checking if OQ result is available

15 years agor300: minor optimization
Maciej Cencora [Wed, 19 Aug 2009 21:35:00 +0000 (23:35 +0200)]
r300: minor optimization

use properly implemented OUT_BATCH_TABLE where possible

15 years agoARB prog lexer: Fix lexer to eat both DOS and Unix line endings
Ian Romanick [Sun, 23 Aug 2009 02:19:40 +0000 (19:19 -0700)]
ARB prog lexer: Fix lexer to eat both DOS and Unix line endings

15 years agor600: use persistent bos for shaders
Alex Deucher [Sun, 23 Aug 2009 17:41:43 +0000 (13:41 -0400)]
r600: use persistent bos for shaders

15 years agor600: always emit CB base
Alex Deucher [Sun, 23 Aug 2009 16:59:09 +0000 (12:59 -0400)]
r600: always emit CB base

Not doing so seems to cause lock-ups or rendering problems
on some chips.  I think there is an logic issue related to
CB and VGT on some chips.  We ran into similar issues in
r600_demo IIRC.

15 years agoradeon: Fix compilation with legacy memory manager.
Pauli Nieminen [Sun, 23 Aug 2009 11:02:46 +0000 (14:02 +0300)]
radeon: Fix compilation with legacy memory manager.

15 years agoradeon: Check from kernel if dma buffer is idle.
Pauli Nieminen [Thu, 20 Aug 2009 14:57:37 +0000 (17:57 +0300)]
radeon: Check from kernel if dma buffer is idle.

This makes sure that objects are leaving wait list only when they are processed by gpu.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agor600: make state emit more fine grained
Alex Deucher [Sat, 22 Aug 2009 22:02:03 +0000 (18:02 -0400)]
r600: make state emit more fine grained

Gives a nice speed boost in most apps since
we only emit what state we need.

15 years agoshader: fix compilation warnings
Renato Caldas [Sat, 22 Aug 2009 19:22:03 +0000 (20:22 +0100)]
shader: fix compilation warnings

This patch fixes some "implicit declaration of function" compilation
errors/warnings on the new shader code.

Signed-off-by: Renato Caldas <seventhguardian@gmail.com>
15 years agoARB prog parser: include imports.h to kill some compiler warnings
Luo Jinghua [Sat, 22 Aug 2009 05:52:46 +0000 (13:52 +0800)]
ARB prog parser: include imports.h to kill some compiler warnings

15 years agor600: move full state to radeon state atoms
Alex Deucher [Sat, 22 Aug 2009 19:03:41 +0000 (15:03 -0400)]
r600: move full state to radeon state atoms

15 years agor600: add support for RS880
Alex Deucher [Sat, 22 Aug 2009 15:44:05 +0000 (11:44 -0400)]
r600: add support for RS880

15 years agoi965: Implement frag prog DPH like DP4
Ian Romanick [Sat, 22 Aug 2009 08:35:12 +0000 (01:35 -0700)]
i965: Implement frag prog DPH like DP4

DPH can output to any component, not just to X.  This allows fpalu.c
to run without hitting the assertion in emit_dph.

15 years agor300: Fix debug output.
Pauli Nieminen [Sat, 22 Aug 2009 01:37:24 +0000 (04:37 +0300)]
r300: Fix debug output.

15 years agost/dri: Remove some debug prints
Jakob Bornecrantz [Sat, 22 Aug 2009 00:35:10 +0000 (01:35 +0100)]
st/dri: Remove some debug prints

15 years agost/dri: Find out if the drawable is a pixmap
Jakob Bornecrantz [Sat, 22 Aug 2009 01:12:21 +0000 (02:12 +0100)]
st/dri: Find out if the drawable is a pixmap

Part of this code is disabled since no performance gains
where detected with it enabled.

This code only detects if it is a pixmap that it is
rendering to on the st/xorg DDX since it sets the fake
front to the same handle as front.

15 years agost/dri: Fix frontbuffer rendering with DRI2
Jakob Bornecrantz [Sat, 22 Aug 2009 01:11:58 +0000 (02:11 +0100)]
st/dri: Fix frontbuffer rendering with DRI2

15 years agost/xorg: Handle fake fronts correctly for pixmaps
Jakob Bornecrantz [Fri, 21 Aug 2009 22:20:46 +0000 (23:20 +0100)]
st/xorg: Handle fake fronts correctly for pixmaps

15 years agoi915g: Remove bad assert on fence
Jakob Bornecrantz [Sat, 22 Aug 2009 01:06:29 +0000 (02:06 +0100)]
i915g: Remove bad assert on fence

15 years agor300: Fix dri1 not to emit state that is not supported in old drm.
Pauli Nieminen [Fri, 21 Aug 2009 23:43:41 +0000 (02:43 +0300)]
r300: Fix dri1 not to emit state that is not supported in old drm.

15 years agoradeon/r300: Code clean up and logic fix.
Pauli Nieminen [Fri, 21 Aug 2009 23:43:00 +0000 (02:43 +0300)]
radeon/r300: Code clean up and logic fix.

15 years agoglx/dri2: Always use X drawable ID for DRI2 protocol.
Michel Dänzer [Fri, 21 Aug 2009 23:33:37 +0000 (01:33 +0200)]
glx/dri2: Always use X drawable ID for DRI2 protocol.

Fixes protocol errors in cases where the GLX ID is different.

15 years agoFix r300 VBO support build on big endian.
Michel Dänzer [Fri, 21 Aug 2009 23:24:39 +0000 (01:24 +0200)]
Fix r300 VBO support build on big endian.

15 years agor600: better default state size.
Alex Deucher [Fri, 21 Aug 2009 21:41:43 +0000 (17:41 -0400)]
r600: better default state size.

Hopefully suokko's emit size impovements will
land soon.

15 years agor300: Remove calls to rcommonEnsureCmdBufSpace.
Pauli Nieminen [Fri, 21 Aug 2009 20:48:39 +0000 (23:48 +0300)]
r300: Remove calls to rcommonEnsureCmdBufSpace.

All rendering is checked in r300PredictTryDrawPrimsSize which mamde these calls useless.

15 years agoradeon: protect against buffer overflow in state atom debug code.
Pauli Nieminen [Fri, 21 Aug 2009 18:21:16 +0000 (21:21 +0300)]
radeon: protect against buffer overflow in state atom debug code.

15 years agoMerge branch 'asm-shader-rework-1'
Ian Romanick [Fri, 21 Aug 2009 18:34:30 +0000 (11:34 -0700)]
Merge branch 'asm-shader-rework-1'

15 years agoradeon: Improve state emit code.
Pauli Nieminen [Fri, 21 Aug 2009 17:44:54 +0000 (20:44 +0300)]
radeon: Improve state emit code.

Trying to make understanding code easier with small refactoring and renaming.

15 years agor300: Add debug output to show how much was emited in TryDrawPrims.
Pauli Nieminen [Fri, 21 Aug 2009 17:10:30 +0000 (20:10 +0300)]
r300: Add debug output to show how much was emited in TryDrawPrims.

15 years agoradeon: fix incorrect loop limit (warned by -O3)
Brian Paul [Fri, 21 Aug 2009 17:04:01 +0000 (11:04 -0600)]
radeon: fix incorrect loop limit (warned by -O3)

15 years agoglx: initialize some local vars to silence warnings with -O3
Brian Paul [Fri, 21 Aug 2009 17:03:30 +0000 (11:03 -0600)]
glx: initialize some local vars to silence warnings with -O3

15 years agost/mesa: flush bitmap cache if Z value changes
Brian Paul [Fri, 21 Aug 2009 16:24:50 +0000 (10:24 -0600)]
st/mesa: flush bitmap cache if Z value changes

When adding a new bitmap to the cache we have to check if the Z value is
changing and flush first if it is.

This is a modified version of a patch from Justin Dou <justin.dou@intel.com>

15 years agor300: Predict emit size for next rendering operation.
Pauli Nieminen [Fri, 21 Aug 2009 15:55:34 +0000 (18:55 +0300)]
r300: Predict emit size for next rendering operation.

We do flush for cmd buffer in case there isn't enough space left for whole
rendering operation. This protects dma regions from getting released in middle
of state emit.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agor300: Handle possible fall back if space check fails.
Pauli Nieminen [Fri, 21 Aug 2009 15:29:06 +0000 (18:29 +0300)]
r300: Handle possible fall back if space check fails.

15 years agor300: Delay allocation of dma regions in TryDrawprims.
Pauli Nieminen [Fri, 21 Aug 2009 09:37:49 +0000 (12:37 +0300)]
r300: Delay allocation of dma regions in TryDrawprims.

This makes it easier to predict size of next rendering operation so we
can do early flush.

15 years agor300: Clean emit code.
Pauli Nieminen [Thu, 20 Aug 2009 20:02:37 +0000 (23:02 +0300)]
r300: Clean emit code.

This fixes some state atom check functions from returing wrong emit size.

There is emit code cleanup so that emit function selection is done in init
time instead of runtime.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agoradeon: Port flush preventation code from r200 to r100.
Pauli Nieminen [Wed, 12 Aug 2009 17:28:54 +0000 (20:28 +0300)]
radeon: Port flush preventation code from r200 to r100.

- emit prediction
- fixes to emit_sizes for data
- clean up of excesive use of radeonEnsureCmdBufferSpace

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agor200: Make swtcl use state size prediction for flush.
Pauli Nieminen [Tue, 11 Aug 2009 22:40:17 +0000 (01:40 +0300)]
r200: Make swtcl use state size prediction for flush.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agor200: Remove unnecessery Elts from r200 context.
Pauli Nieminen [Tue, 11 Aug 2009 22:12:23 +0000 (01:12 +0300)]
r200: Remove unnecessery Elts from r200 context.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agor200: Remove unnecessary calls to rcommonEnsureCmdBufSpace.
Pauli Nieminen [Tue, 11 Aug 2009 21:13:00 +0000 (00:13 +0300)]
r200: Remove unnecessary calls to rcommonEnsureCmdBufSpace.

Calling EnsureCmdBufSpace is not required because rendering pipeline has to quarentee free space.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agor200: Fix atom->check call to return emit size for atom.
Pauli Nieminen [Tue, 11 Aug 2009 21:05:24 +0000 (00:05 +0300)]
r200: Fix atom->check call to return emit size for atom.

This patch makes render emit size prediction count the corect maximum emit size
for state.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agor200: Prevent flush in middle of rendering.
Pauli Nieminen [Tue, 11 Aug 2009 20:43:35 +0000 (23:43 +0300)]
r200: Prevent flush in middle of rendering.

Patch adds prediction functionthat tries to predict emit size to the smallest
possible values that is quarenteed to be higher than worst case scenario in
rendering pipeline.

State emit size prediction code is in place but fix for emit sizes is included
in next patch.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agoradeon/r200: Add -Wall to default build flags like it is in r300/r600
Pauli Nieminen [Fri, 7 Aug 2009 16:35:55 +0000 (19:35 +0300)]
radeon/r200: Add -Wall to default build flags like it is in r300/r600

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agoglx: Make drawables persistent untill they are changed by glXMakeCurrent
Pauli Nieminen [Mon, 3 Aug 2009 22:39:37 +0000 (01:39 +0300)]
glx: Make drawables persistent untill they are changed by glXMakeCurrent

This fixes bug that xdemos/manywin would segfault if it was run with command
./manywin 2. Demo is tring to call glXSwapBuffers while another context was
bind using glXMakeCurrent.

Fix is simple makes drawable and readable persistent untill they change or
context is destroyed.

I found a logic error when same dri context is used for multiple drawables
which caused readable and drawable to fall out of sync in special case. Fix
is simple just updating  drawables more often than in original patch.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
15 years agoegl: Make _eglChooseDriver return the filename of the driver.
Chia-I Wu [Fri, 21 Aug 2009 05:55:30 +0000 (13:55 +0800)]
egl: Make _eglChooseDriver return the filename of the driver.

The real difference is that the driver suffix is now appended.  This
also fixes an annoying bug that EGL_DRIVER could not specify the path to
a driver because a suffix was always appended.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoegl: Remove dependency on libX11.
Chia-I Wu [Fri, 21 Aug 2009 05:53:36 +0000 (13:53 +0800)]
egl: Remove dependency on libX11.

libX11 is used to determine the screen number, which is in turned used
to determine the DRI driver.  However, the sysfs interface for
determining the DRI driver is gone, and no working driver depends on
this mechanism.

Display string parsing is moved to a new function,
_eglSplitDisplayString.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoegl_softpipe: Do not flush unlinked context.
Chia-I Wu [Thu, 20 Aug 2009 11:35:28 +0000 (19:35 +0800)]
egl_softpipe: Do not flush unlinked context.

An unlinked context is destroyed after _eglMakeCurrent.  Flushing such
context would cause segfault.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoegl: Check for null display in handle checking.
Chia-I Wu [Wed, 19 Aug 2009 05:00:25 +0000 (13:00 +0800)]
egl: Check for null display in handle checking.

The display may be NULL when checking a handle.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agost/egl: Add support for drmModeDirtyFB command if found
Jakob Bornecrantz [Fri, 21 Aug 2009 13:02:48 +0000 (15:02 +0200)]
st/egl: Add support for drmModeDirtyFB command if found

15 years agoradeon: Add comment to explain logic for freeing dma buffers.
Pauli Nieminen [Thu, 20 Aug 2009 15:57:35 +0000 (18:57 +0300)]
radeon: Add comment to explain logic for freeing dma buffers.

15 years agoARB prog parser: Revert part of previous change to constant parsing
Ian Romanick [Fri, 21 Aug 2009 01:29:41 +0000 (18:29 -0700)]
ARB prog parser: Revert part of previous change to constant parsing

The commit "ARP prog parser: Implement the spec, not what makes sense"
broke the parsing of scalar constants.  This commit reverts that part
of that commit.  Now vp_swizzle.c passes.

15 years agor600: convert to using common radeon state atoms
Alex Deucher [Thu, 20 Aug 2009 22:55:41 +0000 (18:55 -0400)]
r600: convert to using common radeon state atoms

switches more state handling to common code.  We need
should be more fine grained with the state atoms
eventually.

15 years agor600: improve state emission
Alex Deucher [Thu, 20 Aug 2009 21:20:27 +0000 (17:20 -0400)]
r600: improve state emission

Slowing migrating to atom based system like
the other radeon drivers.

15 years agor600: split state emit into block specific functions
Alex Deucher [Thu, 20 Aug 2009 20:07:07 +0000 (16:07 -0400)]
r600: split state emit into block specific functions

We probably want to go finer grained eventually, but
this is a good start.

15 years agoprogs/glsl: report compile/link times in shtest.c
Brian Paul [Thu, 20 Aug 2009 20:30:08 +0000 (14:30 -0600)]
progs/glsl: report compile/link times in shtest.c

15 years agoprogs/util: added GetShaderCompile/LinkTime() to get compilation/link times
Brian Paul [Thu, 20 Aug 2009 20:29:26 +0000 (14:29 -0600)]
progs/util: added GetShaderCompile/LinkTime() to get compilation/link times

15 years agoprogs/glsl: update multitex.shtest for new texture syntax
Brian Paul [Thu, 20 Aug 2009 20:19:35 +0000 (14:19 -0600)]
progs/glsl: update multitex.shtest for new texture syntax

15 years agoprogs/glsl: update shtest.c to handle 1D/3D/CUBE/RECT textures
Brian Paul [Thu, 20 Aug 2009 20:19:01 +0000 (14:19 -0600)]
progs/glsl: update shtest.c to handle 1D/3D/CUBE/RECT textures

15 years agoprogs/glsl: tweaks to shtest.c
Brian Paul [Thu, 20 Aug 2009 16:58:05 +0000 (10:58 -0600)]
progs/glsl: tweaks to shtest.c

1. Larger sphere to match cube size
2. Allow -geometry option to override window size
3. Cube samplers

15 years agonv50: use VTX_ATTR_nF for constant vtxelts
Christoph Bumiller [Thu, 20 Aug 2009 19:39:02 +0000 (21:39 +0200)]
nv50: use VTX_ATTR_nF for constant vtxelts

15 years agonv50: set vertex buffer limits
Christoph Bumiller [Thu, 20 Aug 2009 19:30:49 +0000 (21:30 +0200)]
nv50: set vertex buffer limits

15 years agonv50: modify vbo format to hw translation, add BGRA swizzle
Christoph Bumiller [Thu, 20 Aug 2009 19:28:28 +0000 (21:28 +0200)]
nv50: modify vbo format to hw translation, add BGRA swizzle

15 years agotgsi: check for SOA dependencies in SSE and PPC code generators
Brian Paul [Thu, 20 Aug 2009 16:34:45 +0000 (10:34 -0600)]
tgsi: check for SOA dependencies in SSE and PPC code generators

Fall back to interpreter for now.  This doesn't happen very often.

15 years agotgsi: handle SOA dependencies for MOV/SWZ
Brian Paul [Thu, 20 Aug 2009 16:28:22 +0000 (10:28 -0600)]
tgsi: handle SOA dependencies for MOV/SWZ

SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled.  For example:

MOV T, T.yxwz; would expand into:

  MOV t0, t1;
  MOV t1, t0;
  MOV t2, t3;
  MOV t3, t2;

The second instruction will produce the wrong result since we wrote to t0
in the first instruction.  We need to use an intermediate temporary to fix
this.

This will take more work to fix for all TGSI instructions.  This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.

Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.

15 years agotgsi: added tgsi_full_instruction::Flags field
Brian Paul [Thu, 20 Aug 2009 16:25:42 +0000 (10:25 -0600)]
tgsi: added tgsi_full_instruction::Flags field

Users of the parser can make use of this.

15 years agost/egl: Open the first drm node
Jakob Bornecrantz [Thu, 20 Aug 2009 15:33:56 +0000 (17:33 +0200)]
st/egl: Open the first drm node

At least its better then hardcoded to i915

15 years agoprogs/glsl: more comments in shtest.c
Brian Paul [Thu, 20 Aug 2009 16:44:32 +0000 (10:44 -0600)]
progs/glsl: more comments in shtest.c

15 years agotgsi: when printing/dumping programs indent loops and conditionals
Brian Paul [Thu, 20 Aug 2009 16:43:48 +0000 (10:43 -0600)]
tgsi: when printing/dumping programs indent loops and conditionals

15 years agotgsi: check for SOA dependencies in SSE and PPC code generators
Brian Paul [Thu, 20 Aug 2009 16:34:45 +0000 (10:34 -0600)]
tgsi: check for SOA dependencies in SSE and PPC code generators

Fall back to interpreter for now.  This doesn't happen very often.

15 years agotgsi: handle SOA dependencies for MOV/SWZ
Brian Paul [Thu, 20 Aug 2009 16:28:22 +0000 (10:28 -0600)]
tgsi: handle SOA dependencies for MOV/SWZ

SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled.  For example:

MOV T, T.yxwz; would expand into:

  MOV t0, t1;
  MOV t1, t0;
  MOV t2, t3;
  MOV t3, t2;

The second instruction will produce the wrong result since we wrote to t0
in the first instruction.  We need to use an intermediate temporary to fix
this.

This will take more work to fix for all TGSI instructions.  This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.

Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.

15 years agotgsi: added tgsi_full_instruction::Flags field
Brian Paul [Thu, 20 Aug 2009 16:25:42 +0000 (10:25 -0600)]
tgsi: added tgsi_full_instruction::Flags field

Users of the parser can make use of this.

15 years agor600: try and get everything in the draw in one IB
Alex Deucher [Thu, 20 Aug 2009 16:10:42 +0000 (12:10 -0400)]
r600: try and get everything in the draw in one IB

fixes corruption issues with apps like teapot and
geartrain.