Commit Graph

39984 Commits

Author SHA1 Message Date
Eric Anholt a57ef244fc i965: Add support for rescaling GL_TEXTURE_RECTANGLE coords to new FS. 2010-10-13 17:07:43 -07:00
Fredrik Höglund a21a2748be r600g: Fix texture sampling with swizzled coords
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-14 09:25:29 +10:00
Dave Airlie 26dacce2c0 r600g: drop unused context members 2010-10-14 09:10:16 +10:00
Ian Romanick 7d8ba5f78f mesa: Clean up various 'unused parameter' warnings in shaderapi 2010-10-13 15:35:23 -07:00
Ian Romanick ccc1c4c6d9 mesa: Clean up two 'comparison between signed and unsigned' warnings 2010-10-13 15:35:23 -07:00
Ian Romanick 5cb24c4a75 mesa: Refactor validation of shader targets
Actually validate that the implementation supports the particular
shader target as well.  Previously if a driver only supported vertex
shaders, for example, glCreateShaderObjectARB would gladly create a
fragment shader.

NOTE: this is a candidate for the 7.9 branch.
2010-10-13 15:35:18 -07:00
Ian Romanick babe20b9d1 mesa: Silence unused variable warning 2010-10-13 15:30:20 -07:00
Ian Romanick 4a45595cf3 linker: Reject shaders that have unresolved function calls
This really amounts to just using the return value from
link_function_calls.  All the work was being done, but the result was
being ignored.

Fixes piglit test link-unresolved-funciton.

NOTE: this is a candidate for the 7.9 branch.
2010-10-13 15:30:19 -07:00
Vinson Lee 720bdfbceb glsl: Initialize variable in ir_derefence_array::constant_expression_value
Completely initialize data passed to ir_constant constructor.

Fixes piglit glsl-mat-from-int-ctor-03 valgrind uninitialized value
error on softpipe.
2010-10-13 14:21:08 -07:00
José Fonseca ae00e34e4b llvmpipe: Generalize the x8z24 fast path to all depth formats.
Together with the previous commit, this generalize the benefits of
d2cf757f44 to all depth formats, in
particular:
- simpler float -> 24unorm conversion
- avoid unsigned comparisons (not directly supported on SSE) by aligning
to the least significant bit
- avoid unecessary/repeated mask ANDing

Verified with trivial/tri-z that the exact same assembly is produced for
X8Z24.
2010-10-13 20:25:57 +01:00
José Fonseca 60c5d4735d gallivm: More accurate float -> 24bit & 32bit unorm conversion. 2010-10-13 20:25:57 +01:00
Brian Paul e487b665aa gallivm: work-around trilinear mipmap filtering regression with LLVM 2.8
The bug only happens on the AOS / fixed-pt path.
2010-10-13 12:37:42 -06:00
Vinson Lee bee22ed6b9 gallivm: Remove unnecessary header. 2010-10-13 11:18:40 -07:00
Brian Paul c3ed27ec76 x11: fix breakage from gl_config::visualType removal 2010-10-13 08:32:08 -06:00
José Fonseca 95c18abb03 llvmpipe: Unbreak Z32_FLOAT.
Z32_FLOAT uses <4 x float> as intermediate/destination type,
instead of <4 x i32>.

The necessary bitcasts got removed with commit
5b7eb868fd

Also use depth/stencil type and build contexts consistently, and
make the depth pointer argument a ordinary <i8 *>, to catch this
sort of issues in the future (and also to pave way for Z16 and
Z32_FLOAT_S8_X24 support).
2010-10-13 15:25:15 +01:00
Kristian Høgsberg f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Kristian Høgsberg 31aca27c08 Drop GLframebuffer typedef and just use struct gl_framebuffer 2010-10-13 09:43:24 -04:00
Kristian Høgsberg d3491e775f Rename GLvisual and __GLcontextModes to struct gl_config 2010-10-13 09:43:24 -04:00
Kristian Høgsberg 705e142dda gl: Remove unused GLcontextModes fields 2010-10-13 09:43:24 -04:00
Kristian Høgsberg e3c1c5377c Get rid of GL/internal/glcore.h
__GLcontextModes is always only used as an implementation internal struct
at this point and we shouldn't install glcore.h anymore.  Anything that
needs __GLcontextModes should just include the struct in its headers files
directly.
2010-10-13 09:43:24 -04:00
Roland Scheidegger d838e4f66d gallivm: only use lp_build_conv 4x4f -> 1x16 ub fastpath with sse2
This is relying on lp_build_pack2 using the sse2 pack intrinsics which
handle clamping.
(Alternatively could have make it use lp_build_packs2 but it might
not even produce more efficient code than not using the fastpath
in the first place.)
2010-10-13 15:26:37 +02:00
Dave Airlie ff4b397517 r600g: fix stencil export for evergreen harder 2010-10-13 18:50:37 +10:00
Stephan Schmid 40cc5bfcd7 r600g: fix relative addressing when splitting constant accesses
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-13 18:49:27 +10:00
Dave Airlie 6da8129b3c r600g: add missing eg reg definition 2010-10-13 17:45:10 +10:00
Dave Airlie 92e729bba5 r600g: evergreen add stencil export bit 2010-10-13 17:40:32 +10:00
Dave Airlie 88c1b32c62 r600g: use blitter for hw copy region
at the moment depth copies are failing (piglit depth-level-clamp)
so use the fallback for now until get some time to investigate.
2010-10-13 15:55:49 +10:00
Dave Airlie f8778eeb40 r600g: drop all use of unsigned long
this changes size on 32/64 bit so is definitely no what you want to use here.
2010-10-13 15:55:48 +10:00
Dave Airlie e9acf9a3bb r600g: fix transfer stride.
fixes segfaults
2010-10-13 15:55:48 +10:00
Dave Airlie e3b089126c r600g: remove bpt and start using pitch_in_bytes/pixels.
this mirror changes in r300g, bpt is kinda useless when it comes to some
of the non-simple texture formats.
2010-10-13 15:55:48 +10:00
Dave Airlie fa797f12b3 r600g: rename pitch in texture to pitch_in_bytes 2010-10-13 15:55:47 +10:00
Dave Airlie 6a0066a69f r600g: use common texture object create function 2010-10-13 15:55:47 +10:00
Dave Airlie 771dd89881 r600g: split out miptree setup like r300g
just a cleanup step towards tiling
2010-10-13 15:55:47 +10:00
Dave Airlie 9979d60c0e r600g: add copy into tiled texture 2010-10-13 15:55:46 +10:00
Dave Airlie 5604276670 r600g: the vs/ps const arrays weren't actually being used.
completely removed them.
2010-10-13 15:56:12 +10:00
Dave Airlie d59498b780 r600g: reduce size of context structure.
this thing will be in the cache a lot, so having massive big struct
arrays inside it won't be helping anyone.
2010-10-13 15:25:00 +10:00
Vinson Lee 8c107e6ca6 tdfx: Silence unused variable warning on non-debug builds.
Fixes this GCC warning.
tdfx_texman.c: In function 'tdfxTMMoveOutTM_NoLock':
tdfx_texman.c:897: warning: unused variable 'shared'
2010-10-12 22:23:21 -07:00
Dave Airlie c8d4108fbe r600g: store samplers/views across blit when we need to modify them
also fixup framebuffer state copies to avoid bad state.
2010-10-13 15:11:30 +10:00
Dave Airlie a8d1d7253e r600g: fix scissor/cliprect confusion
gallium calls them scissors, but r600 hw like r300 is better off using
cliprects to implement them as we can turn them on/off a lot easier.
2010-10-13 15:11:30 +10:00
Dave Airlie 833b4fc11e r600g: fix depth0 setting 2010-10-13 15:11:30 +10:00
Vinson Lee 71fa3f8fe2 r300: Silence uninitialized variable warning.
Fixes this GCC warning.
r300_state.c: In function 'r300InvalidateState':
r300_state.c:2247: warning: 'hw_format' may be used uninitialized in this function
r300_state.c:2247: note: 'hw_format' was declared here
2010-10-12 22:02:27 -07:00
Brian Paul 39de9251c4 mesa: reformatting, comments, code movement 2010-10-12 19:04:05 -06:00
Brian Paul 048a90c1cb draw/llvmpipe: replace DRAW_MAX_TEXTURE_LEVELS with PIPE_MAX_TEXTURE_LEVELS
There's no apparent reason for the former to exist.  And they didn't
even have the same value.
2010-10-12 19:04:05 -06:00
Brian Paul 50f221a01b gallivm: remove newlines 2010-10-12 19:04:05 -06:00
Roland Scheidegger c1549729ce gallivm: fix different handling of [non]normalized coords in linear soa path
There seems to be no reason for it, so do same math for both
(except the scale mul, of course).
2010-10-13 02:35:05 +02:00
Brian Paul 1ca5f7cc31 mesa: remove assertion w/ undeclared variable texelBytes 2010-10-12 18:32:06 -06:00
Dave Airlie 5f612f5c00 st/mesa: enable stencil shader export extension if supported 2010-10-13 09:30:05 +10:00
Dave Airlie d9671863ea glsl: add support for shader stencil export
This adds proper support for the GL_ARB_shader_stencil_export extension
to the GLSL compiler. Thanks to Ian for pointing out where I need to add things.
2010-10-13 09:30:05 +10:00
Dave Airlie 39d1feb51e r600g: add shader stencil export support. 2010-10-13 09:30:05 +10:00
Dave Airlie 40acb109de r600g: add support for S8, X24S8 and S8X24 sampler formats. 2010-10-13 09:30:04 +10:00
Dave Airlie ef8bb7ada9 st/mesa: use shader stencil export to accelerate shader drawpixels.
If the pipe driver has shader stencil export we can accelerate DrawPixels
using it. It tries to pick an S8 texture and works its way to X24S8 and S8X24
if that isn't supported.
2010-10-13 09:30:04 +10:00