Commit Graph

53003 Commits

Author SHA1 Message Date
Vincent Lejeune fb40f88338 radeon/llvm: support for interpolation intrinsics
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2012-09-22 18:12:11 +02:00
Marek Olšák 2988fa940e draw: fix non-indexed draw calls if there's an index buffer
pipe_draw_info::indexed determines if it should be indexed and not
the presence of an index buffer.

This fixes crashes in r300g.

NOTE: This is a candidate for the stable branches.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-22 14:20:37 +02:00
Tom Stellard bbb2ebe2fc r600g: Fix build with LLVM compiler 2012-09-21 20:07:14 -04:00
Marek Olšák bfe489c76b r600g: set QUANT_MODE on Cayman too
This fixes piglit/fbo-blit-stretched.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-22 00:31:59 +02:00
Marek Olšák 11e2a41b84 r600g: use CS helpers to emit streamout state
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-22 00:31:59 +02:00
Marek Olšák 669bfaaa1e r600g: remove initialization of unused loop register tables
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-22 00:31:59 +02:00
Marek Olšák b71701d43e r600g: remove now-unused SURFACE_BASE_UPDATE logic
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-22 00:31:58 +02:00
Marek Olšák e3ecfecada r600g: remove unused CB registers from register lists
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-22 00:31:58 +02:00
Marek Olšák c8b06dccff r600g: atomize framebuffer state
Tested on RS880, Evergreen and Cayman.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-22 00:31:58 +02:00
Marek Olšák b652180107 r600g: don't snoop context state while building shaders
Let's use the shader key describing the state.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-22 00:31:58 +02:00
Anuj Phogat eb1d87fb94 meta: Add on demand compilation of per target shader programs
A call to glGenerateMipmap() follows the generation of a relevant
shader program in setup_glsl_generate_mipmap().

To support all texture targets and to avoid compiling shaders
everytime, per target shader programs are compiled on demand
and saved for the next call.

Fixes float-texture(mipmap.manual):
See Comment 6: https://bugs.freedesktop.org/show_bug.cgi?id=54296

NOTE: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-21 13:31:58 -07:00
Tom Stellard 8ed9aaea51 clover: Initialize height and depth to 1 for transfers
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2012-09-21 19:45:17 +00:00
Tom Stellard 024e1732cb pipe-loader: Remove a few debug_printfs
On debug builds these were always being printed.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2012-09-21 19:45:07 +00:00
Tom Stellard 438b1da7e5 radeon/llvm: Handle loads from the constants address space.
Reading from constant memory is not supported yet, so constant reads use
global memory.
2012-09-21 19:30:58 +00:00
Tom Stellard 3882d7b5e4 radeon/llvm: Add support for v4f32 stores on R600 2012-09-21 19:30:58 +00:00
Tom Stellard e866dbd1b5 radeon/llvm: Add support for i8 reads on R600 2012-09-21 19:30:57 +00:00
Tom Stellard b282c9611e radeon/llvm: Expand vector fadd and fmul on R600 2012-09-21 19:30:57 +00:00
Tom Stellard aa8367dd13 radeon/llvm: Add optimization for FP_ROUND 2012-09-21 19:30:57 +00:00
Tom Stellard 87decd6e66 radeon/llvm: Replace AMDGPU pow intrinsic with the llvm version 2012-09-21 19:30:53 +00:00
Paul Berry aa3c2e3186 i965/blorp: Fix narrowing warnings.
Blorp has to convert rectangle coordinates from integers to floats in
order to send them down the GPU pipeline.  Recent versions of GCC
issue a warning for this, since a float is not capable of precisely
representing all possible 32-bit integer values.  Suppress the warning
with an explicit type cast in the case of blorp, since rectangle
coordinates will never be large enough to cause a loss of precision.

Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-21 10:53:25 +02:00
Kenneth Graunke cd49025aff i965: Remove brw_set_predicate_inverse(p, true) from scratch offset code
Given that it exists between a push/pop of instruction state, this call
can only affect the MOV or ADD instruction generated just below it.
Neither of those instructions are predicated, so it makes no sense to
ask for the inverse predicate.

This fixes grumblings from the simulator debugger, which was
complaining about an invalid predicate.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-21 01:29:40 -07:00
Kenneth Graunke 328961d955 mesa: Don't override S3TC internalFormat if data is pre-compressed.
Commit 42723d88d intended to override an S3TC internalFormat to a
generic compressed format when the application requested online
compression of uncompressed data.  Unfortunately, it also broke
pre-compressed textures when libtxc_dxtn isn't installed but the
extensions are forced on.

Both glCompressedTexImage2D() and glTexImage2D() call teximage(), which
calls _mesa_choose_texture_format(), hitting this override code.  If we
have actual S3TC source data, we can't treat it as any other format, and
need to avoid the override.

Since glCompressedTexImage2D() passes in a format of GL_NONE (which is
illegal for glTexImage), we can use that to detect the pre-compressed
case and avoid the overrides.

Fixes a regression since 42723d88d3.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com>
2012-09-20 14:49:19 -07:00
Kenneth Graunke e2249e8c4d i965/blorp: Add support for blits between SRGB and linear formats.
Fixes colorspace issues in L4D2 when multisampling is enabled (the
scene was far too dark, but the flashlight area was way too bright).

The nVidia and AMD binary drivers both allow this kind of blit.

NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-20 14:48:02 -07:00
Kenneth Graunke c96828ecb4 mesa: Ignore SRGB when determining compatible resolve formats.
MSAA resolves and other blit-like operations ignore SRGB state anyway,
so we should be able to safely allow resolves between compatible
SRGB/linear formats like SRGBA8 and RGBA8888.

This matches the behavior of the nVidia and AMD binary drivers.

Fixes completely black rendering when using multisampling in L4D2.

NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-20 14:47:23 -07:00
Andreas Boll 8504f18c3d docs: update some more FAQs
v2: remove mention of XFree86

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:37 +02:00
Andreas Boll 0188b9371f docs: remove utility.html
This page is very old and some of the links are dead.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:37 +02:00
Andreas Boll 19195781c8 docs: remove science.html
This page is very old and some of the links are dead.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:37 +02:00
Andreas Boll 19fe84d8df docs: remove modelers.html
This page is very old and some of the links are dead.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Andreas Boll ca6ff299c5 docs: remove libraries.html
This page is very old and some of the links are dead.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Andreas Boll b1c75e7257 docs: remove games.html
This page is very old and some of the links are dead.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Andreas Boll 9e2af606b6 docs/contents: add autoconf.html link
make it easier to find the docs/autoconf.html site

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Andreas Boll 7b314b3b14 docs: convert last traces of progs to mesa/demos repository
v2: fix typo

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Andreas Boll 356a73145e docs: add IRC info
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Andreas Boll 76d4f9e404 docs/egl: improve markup
replace unordered list <ul> with defined list <dl>

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Andreas Boll 63eade4b60 docs/autoconf: improve markup
replace unordered list <ul> with defined list <dl>

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Andreas Boll ab06629d5d docs/autoconf: remove obsolete demo options
removed with commit 56c3cce2a1
two years ago

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Andreas Boll d61707d0f8 docs: improve quality of gears.png
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 20:00:36 +02:00
Brian Paul 58f386b20b gallium: mention PIPE_TIMEOUT_INFINITE in the fence_finish() comment 2012-09-20 09:49:12 -06:00
Brian Paul 0bcad02955 llvmpipe: fix overflow bug in total texture size computation
v2: use uint64_t for the total_size variable, per Jose.

Also add two earlier checks for exceeding the max texture size.
For example a 1K^3 RGBA volume would overflow the lpr->image_stride
variable.

Use simple algebra to avoid overflow in intermediate values.
So instead of "x * y > z" use "x > z / y".

This should work if we happen to be on a platform that doesn't have
64-bit types.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-09-20 09:47:09 -06:00
Alex Deucher 7b4aefd3c9 r600g/llvm: rs780/rs880 are r600 asics
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-20 11:17:52 -04:00
Ian Romanick ae3023e967 mesa: Allow glGetTexParameter of GL_TEXTURE_SRGB_DECODE_EXT
This was already (correctly) supported for glGetSamplerParameter paths.

NOTE: This is a candidate for stable branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20 11:42:56 +02:00
Tom Stellard bd8fb9e805 r300/compiler: Use precomputed q values in the register allocator 2012-09-19 19:25:53 -04:00
Tom Stellard 886a4d4a6a r300g: Init regalloc state during context creation
Initializing the regalloc state is expensive, and since it is always
the same for every compile we only need to initialize it once per
context.  This should help improve shader compile times for the driver.
2012-09-19 19:25:53 -04:00
Tom Stellard 9282adcae9 r300/compiler: Don't create register classes for inputs 2012-09-19 19:25:53 -04:00
Tom Stellard e0f64a837f ra: Add q_values parameter to ra_set_finalize()
This allows the user to pass precomputed q values to the allocator.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-19 19:25:53 -04:00
Tom Stellard cfeb99c7da ra: Clarify usage of ra_set_node_reg()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-19 19:25:53 -04:00
Tom Stellard 69b387fbdc r600g: Invalidate texture cache when creating vertex buffers for compute v2
Compute shaders fetch data from vertex buffers via the texture cache, so
we need to make sure the texture cache is flushed.

v2:
  - Fix rebase mistake
  - Fix spelling in comment

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-09-19 14:58:53 -04:00
Tom Stellard 810345492e r600g: Use LOOP_START_DX10 for loops
LOOP_START_DX10 ignores the LOOP_CONFIG* registers, so it is not limited
to 4096 iterations like the other LOOP_* instructions.  Compute shaders
need to use this instruction, and since we aren't optimizing loops with
the LOOP_CONFIG* registers for pixel and vertex shaders, it seems like
we should just use it for everything.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-09-19 14:58:53 -04:00
Tom Stellard 3e3ca92718 r600g: Set the correct value of COLOR*_DIM for RATs
For buffers (which is what is being used for RATs), the
COLOR*_DIM.WIDTH_MASK field needs to be set to the low 16-bits of the
buffer size, and the COLOR*_DIM.HEIEGHT_MAX needs to be set to the
high bits.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-09-19 14:58:53 -04:00
Tom Stellard 9db64530bb r600g: Make sure to initialize DB_DEPTH_CONTROL register for compute
The kernel CS checker will fail if this register is not initialized.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-09-19 14:58:53 -04:00