Commit graph

47137 commits

Author SHA1 Message Date
Christoph Bumiller
2ec5c8feb3 nvc0/ir: GP emit address must end up in $r0 2011-10-21 23:00:38 +02:00
Christoph Bumiller
30cb66cd74 nvc0/ir: TXQ requires different lowering from normal TEX 2011-10-21 23:00:38 +02:00
Christoph Bumiller
6b27f14680 nv50/ir: initialize default prog_info values for GP,TP 2011-10-21 23:00:38 +02:00
Christoph Bumiller
63ca1abcc4 nv50/ir: fix memory value equality check 2011-10-21 23:00:38 +02:00
Christoph Bumiller
e3a3844e8d nv50/ir: fix leak in removal of graph root 2011-10-21 23:00:38 +02:00
Christoph Bumiller
d5cfab703b d3d1x: fix/improve OMSetRenderTargets
Don't count trailing NULL RTVs.
Don't skip update if only DSV has changed.
2011-10-21 23:00:38 +02:00
Christoph Bumiller
3dff43d897 d3d1x: avoid translating invalid blend, depth or stencil state 2011-10-21 23:00:38 +02:00
Christoph Bumiller
74ff845e33 d3d1x: add support for buffer views 2011-10-21 23:00:38 +02:00
Christoph Bumiller
1fc5aee8ff d3d1x: improve CreateInputLayout 2011-10-21 23:00:38 +02:00
Christoph Bumiller
856f3336dc d3d1x/context: fix IASetVertexBuffers stride comparison 2011-10-21 23:00:38 +02:00
Christoph Bumiller
5b6f3a2e3c d3d1x: use ZS formats for TYPELESS resources with DS binding 2011-10-21 23:00:38 +02:00
Christoph Bumiller
845808f105 d3d1x: use resource format if view format is UNKNOWN 2011-10-21 23:00:37 +02:00
Christoph Bumiller
5081ebf238 d3d1x: fix shadow comparison to gallium enum off by one 2011-10-21 23:00:37 +02:00
Christoph Bumiller
c0e03c7694 d3d1x: improve CheckFormatSupport 2011-10-21 23:00:37 +02:00
Christoph Bumiller
77574bf0f4 d3d1x: update format mapping table
Use the proper integer formats.
Fix mapping of some PIPE depth formats to DXGI.
2011-10-21 23:00:37 +02:00
Christoph Bumiller
6ab6c43079 d3d1x: fix translation of subresource to layer 2011-10-21 23:00:37 +02:00
Christoph Bumiller
4b7851623e d3d1x: fix initial data upload for 3D textures 2011-10-21 23:00:37 +02:00
Christoph Bumiller
dac5baf2e4 d3d1x: MipLevels -1 in resource view desc means all 2011-10-21 23:00:37 +02:00
Christoph Bumiller
5d70b5d10b d3d1x/dxgi: fix initialization of pipe_box for Present copy 2011-10-21 23:00:37 +02:00
Christoph Bumiller
c463dfe4e4 d3d1x: implement array textures 2011-10-21 23:00:37 +02:00
Christoph Bumiller
c43b2f6a30 nvc0/ir: handle levelZero modifier in TEX emission 2011-10-21 23:00:37 +02:00
Christoph Bumiller
b5f2c0505f nvc0/ir: fix lowering of DIV F32 2011-10-21 23:00:37 +02:00
Christoph Bumiller
cb88426293 d3d1x: fix refcounting of GalliumD3D11DeviceChild objects
An external Release would have lowered the device reference count,
but an internal reference in the context does not raise it (by
design).
2011-10-21 23:00:37 +02:00
Christoph Bumiller
3fc2818f2b nvc0/ir: fix xy confusion typo in readTessCoord 2011-10-21 23:00:37 +02:00
Christoph Bumiller
c8ae342bf3 d3d1x/sm4: save CUSTOMDATA
This is the data for the immediate constant buffer.
2011-10-21 23:00:36 +02:00
Christoph Bumiller
903e3257d0 d3d1x: add FORK/JOIN phase opcodes to declarations
The phase instance counts are not necessarily redeclared so with
the separation of declarations and instructions we wouldn't know
which instance count applies to which phase.
2011-10-21 23:00:36 +02:00
Christoph Bumiller
d2cc8aedb5 d3d1x: add shader signature to sm4_program
Correct linkage requires examining the signature itself, it cannot
be reconstructed from declarations only since unused registers may
have been omitted from them.
2011-10-21 23:00:36 +02:00
Christoph Bumiller
47eb8a23eb d3d1x: attempt to detect D3D10 feature level
Virtually all applications refuse to use the D3D10 backend if this
level is not supported, which makes testing annoying.
2011-10-21 23:00:36 +02:00
Christoph Bumiller
65303c49d1 d3d1x: switch to TGSI SAMPLE opcodes
We don't want to clutter the code or handicap new hardware for
the sake of ancient GPUs on which d3d1x won't ever be used,
much less be fully compliant, anyway.
2011-10-21 23:00:36 +02:00
Brian Paul
6b72eded19 st/mesa: fix a bug in and re-org setup_interleaved_attribs()
We were mis-computing the size of the user-space vertex buffer in
some circumstances.  This led to a failed assertion at u_inlines.h:222
when using the VMware svga driver.

For example, if we had arrays such as:

array[0]: element_offset = 12, stride = 24
array[1]: element_offset = 0, stride = 24

We'd mistakenly compute 'bytes' to be 12 bytes too small.

I've reorganized the function too.  By time it's called, we know that
we've got interleaved arrays either all in one VBO or all in user memory
and the stride is equal for all arrays.

Move the code that lived inside the attr==0 test after the loop.

In the loop we compute the true vertex size.  That size factors into the
pipe->redefine_user_buffer() call later.  Using the vertex size instead
of array[0]'s element_offset fixes the failed assertion.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-10-21 10:09:48 -06:00
Kenneth Graunke
1595c79d9c glsl: Short-circuit lower_if_to_cond_assign when MaxIfDepth is UINT_MAX.
Setting MaxIfDepth to UINT_MAX effectively means "don't lower anything."

Explicitly checking for this common case allows us to avoid walking the
IR, computing nesting levels, and so on.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Bryan Cain <bryancain3@gmail.com>
2011-10-21 01:11:20 -07:00
Kenneth Graunke
01f9fdc4ac i965: Set MaxIfDepth to UINT_MAX on Gen6+ and 16 on prior generations.
Commit 488fe51cf8 converted the EmitNoIfs
flag to MaxIfDepth, an unsigned integer saying "flatten if-statements
nested beyond this depth."

Unfortunately, i965 left this initialized to 0, which made ir_to_mesa
attempt to flatten all if-statements.  We didn't notice right away
because we usually throw away ir_to_mesa's code in favor of the native
VS and FS backends...but this still creates a lot of unnecessary work.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-21 01:11:17 -07:00
Jeremy Huddleston
9f2abbee62 apple: Use the correct (OpenGL.framework) glViewport and glScissor during init
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-21 00:34:06 -07:00
Jeremy Huddleston
098ecfad83 apple: Silence some debug spew
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-21 00:34:06 -07:00
Marek Olšák
7a3bbd3d5d r600g: cleanup r600_reset_blittable_to_compressed 2011-10-21 03:34:54 +02:00
Vinson Lee
f664d6a2f3 st/mesa: Initialize variable.
ptr is uninitialized if ib is NULL.

Fixes Coverity uninitialized pointer read defect.

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-20 17:12:37 -07:00
Alan Coopersmith
b27298055e Add solaris detection for PIPE_ARCH_LITTLE_ENDIAN/PIPE_ARCH_BIG_ENDIAN
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-20 17:02:12 -07:00
Kenneth Graunke
6e160d01f2 i965: Remove copy and pasted gen7_wm_constants state atom.
Now that this is identical to gen6_wm_constants, just use that instead.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-20 15:25:37 -07:00
Kenneth Graunke
b293b3cbb1 i965: Use AUB_TRACE_WM_CONSTANTS in gen7_prepare_wm_push_constants.
This makes it match gen6_prepare_wm_push_constants.  For some reason, it
had been using AUB_TRACE_NO_TYPE.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-20 15:25:34 -07:00
Kenneth Graunke
61d7f4b9d4 i965: Fix incorrect dirty bit in gen6_prepare_wm_push_constants.
We definitely want CACHE_NEW_WM_PROG, not CACHE_NEW_VS_PROG.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-20 15:25:26 -07:00
Marek Olšák
a04f8c3612 r300g: don't return NULL in resource_from_handle if the resource is too small
The DDX may allocate a buffer with a too small size.
Instead of failing, let's pretend everything's alright.

Such bugs should be fixed in the DDX, of course.

NOTE: This is a candidate for the stable branches.
2011-10-20 23:37:22 +02:00
Brian Paul
c60eb632b7 docs: document known issues with Viewperf 11 2011-10-20 15:13:17 -06:00
Eric Anholt
31874f074c i965/vs: Fix comparisons with uint negation.
The condmod instruction ends up generating garbage condition codes,
because apparently the comparison happens on the accumulator value (33
bits for UD), not the truncated value that would be written.

Fixes vs-op-neg-*

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-10-20 09:51:58 -07:00
Eric Anholt
73b0a28ba8 i965/fs: Fix comparisions with uint negation.
The condmod instruction ends up generating garbage condition codes,
because apparently the comparison happens on the accumulator value (33
bits for UD), not the truncated value that would be written.

Fixes fs-op-neg-*

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-10-20 09:50:49 -07:00
Christoph Bumiller
55c5ad8dfa d3d1x: make use of new query types 2011-10-20 18:03:54 +02:00
Christoph Bumiller
1f4f0c41db softpipe: implement/fix TIMESTAMP queries 2011-10-20 18:03:49 +02:00
Christoph Bumiller
10f67c070b gallium: add new query types and missing documentation 2011-10-20 18:03:23 +02:00
Eric Anholt
c0cd947117 mesa: Fix detection of whether an ARB_vp is enabled for two sided lighting.
When there is no ARB_vertex_program program enabled, the Current
pointer points at a default program, so we were always using
VERTEX_PROGRAM_TWO_SIDE, even for fixed function lighting.

Fixes piglit two-sided-lighting*

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-20 08:45:20 -07:00
Eric Anholt
f80e1e7d1d mesa: Round the argument to PixelStoref instead of truncating.
From the GL 2.1 specification, page 114 (page 128 of the PDF):

    "The version of PixelStore that takes a floating-point value
     may be used to set any type of parameter; if the parameter is
     boolean, then it is set to FALSE if the passed value is 0.0
     and TRUE otherwise, while if the parameter is an integer, then
     the passed value is rounded to the nearest integer."

Fixes piglit roundmode-pixelstore.
Note: This is a candidate for the 7.11 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-20 08:45:07 -07:00
Yuanhan Liu
46d5fb576a mesa: handle PBO access error in display list mode
Simply generate GL_INVALID_OPERATION error at display list mode. As
explained by Brian, we are going to access PBO data at compile time.
No need to defer the error at execution time.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-20 11:42:54 +08:00