Eric Anholt
aba9801996
i965/vs: Fix types of varying outputs.
...
For structs/arrays/matrices, they were ending up as uint because we
forgot to set them. All varyings in GLSL 1.20 are of base type float,
so just force the matter here (which gets inherited at
emit_urb_writes() time).
Fixes vs-varying-array-mat2-col-rd.
2011-08-16 13:04:42 -07:00
Eric Anholt
9790726131
i965/vs: Handle assignment of structures/arrays/matrices better.
...
This gets the right types on the instructions, as well as emitting
minimal swizzles/writemasks.
2011-08-16 13:04:42 -07:00
Eric Anholt
930afd1774
i965/vs: Don't forget to set up assignment condition code for arrays/structs.
...
Fixes vs-uniform-array-mat2-index-col-rd.
2011-08-16 13:04:42 -07:00
Eric Anholt
cda28bca0d
i965/vs: Apply the gen6 math workaround for math1 instructions.
...
Fixes glsl-vs-masked-cos.
2011-08-16 13:04:42 -07:00
Eric Anholt
2b7632aeaa
i965/vs: Add support for if(any_nequal()) and if(all_equal()) on gen6.
...
Fixes vs-temp-array-mat2-col-rd.shader_test.
2011-08-16 13:04:42 -07:00
Eric Anholt
c3752b399a
i965/vs: Add support for dot product opcodes.
...
Fixes glsl-vs-dot-vec2.
2011-08-16 13:04:42 -07:00
Eric Anholt
8e947c2546
i965/vs: Fix the types of array/struct dereferences.
...
Fixes glsl-vs-arrays-3.
2011-08-16 13:04:42 -07:00
Eric Anholt
814a9bef30
i965/vs: Drop the assertion about dst.reg_offset == 0.
...
Adding the offset is the right thing to do here, and fixes
glsl-vs-mat-add-1.
2011-08-16 13:04:42 -07:00
Eric Anholt
e5363c7fd2
i965/vs: Use an appropriate swizzle on src regs from variables.
...
Fixes glsl-vs-if-bool.
2011-08-16 13:04:42 -07:00
Eric Anholt
eca762d831
i965/vs: Fix support for zero uniforms in use.
...
We were looking for attributes in the wrong place, and pointlessly
doing the work on gen6 at all.
2011-08-16 13:04:42 -07:00
Eric Anholt
164ccd2778
i965/vs: Fix support for "IF" instructions by copying brw_fs_visitor.cpp.
...
Fixes glsl-vs-if-greater.
2011-08-16 13:04:41 -07:00
Eric Anholt
aa753c5a14
i965/vs: Disable loops for now until rendering is generally correct.
2011-08-16 13:04:41 -07:00
Eric Anholt
bb468fc1ed
i965/vs: Fix ir_swizzle handling.
...
I decided to refactor it a bit in adapting ir_to_mesa.cpp code, and
mangled it. Fixes glsl-vs-cross-2.
2011-08-16 13:04:41 -07:00
Eric Anholt
78fac1892a
i965/vs: Allocate storage for "auto" variables just like temps.
...
Fixes segfault in glsl-vs-cross-2.
2011-08-16 13:04:41 -07:00
Eric Anholt
82aa9299fb
i965/vs: Allow scalar values in assignments, too.
...
Fixes glsl-vs-all-02 and many other tests.
2011-08-16 13:04:41 -07:00
Eric Anholt
c0f334a3ed
i965/vs: Don't emit an extra copy of the vertex position.
...
Fixes glsl-vs-abs-neg, glsl-vs-all-01, and probably many other tests.
2011-08-16 13:04:41 -07:00
Eric Anholt
4a4857246c
i965/vs: Port the fix for clip plane writemasks from brw_vs_emit.c.
2011-08-16 13:04:41 -07:00
Eric Anholt
83d5850518
i965/vs: Fix constant vector construction.
...
Fixes some issues noticed in glsl-vs-all-01.
2011-08-16 13:04:41 -07:00
Eric Anholt
a070d5f363
i965/vs: Start adding support for uniforms
...
There's no clever packing here, no pull constants, and no array support.
2011-08-16 13:04:41 -07:00
Eric Anholt
af3c9803d8
i965: Start adding the VS visitor and codegen.
...
The low-level IR is a mashup of brw_fs.cpp and ir_to_mesa.cpp. It's
currently controlled by the INTEL_NEW_VS=1 environment variable, and
only tested for the trivial "gl_Position = gl_Vertex;" shader so far.
2011-08-16 13:04:41 -07:00
Eric Anholt
65b5cbbcf7
i965: Rename math FS_OPCODE_* to SHADER_OPCODE_*.
...
I want to just use the same enums in the VS.
2011-08-16 13:04:41 -07:00
Eric Anholt
6034b9a512
i965: Create a shared enum for hardware and compiler-internal opcodes.
...
This should make gdbing more pleasant, and it might be used in sharing
part of the codegen between the VS and FS backends.
2011-08-16 13:04:41 -07:00
Eric Anholt
c1f00731fd
i965: Generate driver-specific IR for non-fragment shaders as well.
...
This will be used by the new vertex shader backend. The scalarizing
passes are skipped for non-fragment, since vertex and geometry threads
are based on vec4s.
2011-08-16 13:04:41 -07:00
Brian Paul
11e4ea0010
mesa: ChooseTextureFormat() returns gl_format, not GLuint
2011-08-16 13:05:34 -06:00
Paul Berry
af501e2b29
glsl: Fix type error when lowering integer divisions
...
This patch fixes a bug when lowering an integer division:
x/y
to a multiplication by a reciprocal:
int(float(x)*reciprocal(float(y)))
If x was a plain int and y was an ivecN, the lowering pass
incorrectly assigned the type of the product to be float, when in fact
it should be vecN. This caused mesa to abort with an IR validation
error.
Fixes piglit tests {fs,vs}-op-div-int-ivec{2,3,4}.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-08-16 11:00:46 -07:00
Marek Olšák
9e8f556b19
softpipe: fix an obvious copy-paste error in get_query_result
...
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-16 19:56:29 +02:00
Marek Olšák
5e7713caa9
st/dri: remove an unused-but-set variable
2011-08-16 19:39:59 +02:00
Marek Olšák
4a47662bea
r600g: rename bc -> bytecode
...
It took me a while to figure out what it stands for.
2011-08-16 19:39:59 +02:00
Benjamin Franzke
61d2dfbe48
egl: Add include paths for platform autodetection
...
Needed since commit 85fe9484 .
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40145
2011-08-16 19:28:07 +02:00
Cooper Yuan
f272117def
dri2: check if context is valid before flushing the pipe
2011-08-16 20:37:13 +08:00
Marek Olšák
e3be513118
r600g: expose ARB_ES2_compatibility by claiming fixed-point format support
...
I also needed to make some changes in u_vbuf_mgr in order to override
the caps from the driver and enable the fallback even though the driver
claims the format is supported.
2011-08-16 09:15:11 +02:00
Marek Olšák
21c5d11b7e
noop: redirect the get_param/is_format.. queries to the underlying driver
2011-08-16 09:15:11 +02:00
Marek Olšák
363295d720
u_blitter: restore some states conditionally
2011-08-16 09:15:11 +02:00
Marek Olšák
233dd4953e
u_blitter: rename util_blitter_copy_region -> util_blitter_copy_texture
2011-08-16 09:15:11 +02:00
Marek Olšák
a77431b3b0
r600g: consolidate two files r600d.h
2011-08-16 09:15:11 +02:00
Marek Olšák
47dcfb8dab
r600g: set read/write usage flags for each relocation
...
This takes advantage of the new GEM_WAIT ioctl when mapping buffers.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
ebfcc58b93
winsys/radeon: take advantage of the new ioctl
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
1e3c81a068
winsys/radeon: hook up the new DRM_RADEON_GEM_WAIT ioctl
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
296b899095
winsys/radeon: remove broken bo-is-busy-for-write guessing
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
c79e9f0ed5
r600g: enable thread offloading
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
0bbbd82488
r600g: undefine RADEON_CTX_MAX_PM4
...
winsys/radeon has its own definition.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
d6da5185f9
r600g: don't include radeon_drm.h and xf86drm.h
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
efbccfeca0
winsys/radeon: remove the device file descriptor from the interface
...
r600g doesn't need it anymore.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
041ed559e1
r600g: remove an unused parameter from r600_bo_destroy
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
c6fec83726
r600g: merge radeon_bo with r600_bo
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
5229ba494b
r600g: remove radeon_bo::handle
...
This should be private to radeon_winsys.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
ab630b5768
r600g: use buffer_map/unmap from radeon_winsys
...
This also drops the unneeded bo_busy/wait functions.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
e2e1dc9e66
r600g: set the flush callback in radeon_winsys
...
I have also renamed the winsys function.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
7ee65800c3
r600g: get tiling flags using radeon_winsys
...
Also remove some unused fence-related leftovers.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
ecfcf25387
r600g: get winsys_handle using radeon_winsys
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00