Commit Graph

39748 Commits

Author SHA1 Message Date
Eric Anholt 57edd7c5c1 i965: Fix valgrind complaint about base_ir for new FS debugging. 2010-09-28 09:33:30 -07:00
Eric Anholt 1723fdb3f0 i965: Apply the same set of lowering passes to new FS as to Mesa IR.
While much of this we will want to support natively, this should make
the task of reaching the Mesa IR backend's quality easier.

Fixes:
glsl-fs-main-return.
2010-09-28 09:33:30 -07:00
Eric Anholt e10508812a i965: Actually track the "if" depth in loop in the new FS backend.
Fixes:
glsl-fs-if-nested-loop.
2010-09-28 09:33:30 -07:00
Eric Anholt fceb78e3cc i965: Fix negation in the new FS backend.
Fixes:
glsl1-Negation
glsl1-Negation2
2010-09-28 09:33:30 -07:00
Jerome Glisse 7ee8fa0421 r600g: switch to new design
New design seems to be on parity according to piglit,
make it default to get more exposure and see if there
is any show stopper in the coming days.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-28 11:37:30 -04:00
Jerome Glisse b534eb16a2 r600g: fix remaining piglit issue in new design
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-28 11:12:03 -04:00
Jerome Glisse 5a38cec7c8 r600g: use ptr for blit depth uncompress function
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-28 09:51:08 -04:00
Christoph Bumiller e0b93c5beb nv50: fix GP state bind and validate 2010-09-28 11:22:59 +02:00
Dave Airlie 175261a1f1 r600g: on evergreen the centroid isn't set in this register. 2010-09-28 19:02:46 +10:00
Zhenyu Wang 45b37c4b12 i965: fallback bitmap operation on sandybridge
Need to bring back correct fb write with header to set pixel
write mask. Fallback for now.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 3074b61f64 i965: fix occlusion query on sandybridge
Fix pipe control command for depth stall and PS_DEPTH_COUNT write.
2010-09-28 15:58:21 +08:00
Zhenyu Wang ec99833e92 i965: fix point sprite on sandybridge
Need to set point sprite function in fixed SF state now on sandybridge.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 4b6b0bf24a i965: fix scissor state on sandybridge
Fix incorrect scissor rect struct and missed scissor state pointer
setting for sandybridge.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 3f3059fcc0 i965: enable polygon offset on sandybridge
Depth offset function is moved to SF stage on sandybridge.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 15a8e7ec90 i965: fix pixel w interpolation on sandybridge 2010-09-28 15:58:21 +08:00
Zhenyu Wang 85fa900b93 i965: don't do calculation for delta_xy on sandybridge
Sandybridge doesn't have Xstart/Ystart in payload header.
2010-09-28 15:58:21 +08:00
Zhenyu Wang c58bf2cee5 i965: only allow SIMD8 kernel on sandybridge now
Until we fixed SIMD16 kernel, force to SIMD8 on sandybridge now.
2010-09-28 15:58:21 +08:00
Zhenyu Wang 18c3b754f9 i965: sandybridge pipe control workaround before write cache flush
Must issue a pipe control with any non-zero post sync op before
write cache flush = 1 pipe control.
2010-09-28 15:58:21 +08:00
Zhenyu Wang c8033f1b1e i965: Add all device ids for sandybridge 2010-09-28 15:58:20 +08:00
Zhenyu Wang 81aae67e58 i965: fix const register count for sandybridge
Sandybridge's PS constant buffer payload size is decided from
push const buffer command, incorrect size would cause wrong data
in payload for position and vertex attributes. This fixes coefficients
for tex2d/tex3d.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 956f866030 i965: Fix sampler on sandybridge
Sandybridge has not much change on texture sampler with Ironlake.
2010-09-28 15:58:20 +08:00
Zhenyu Wang c5a3b25bb9 i965: fix jump count on sandybridge
Jump count is for 64bit long each, so one instruction requires 2
like on Ironlake.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 9c39a9fcb2 i965: VS use SPF mode on sandybridge for now
Until conditional instructions were fixed, use SPF mode instead for now.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 7401a98e29 i965: add sandybridge viewport state bo into validation list 2010-09-28 15:58:20 +08:00
Zhenyu Wang a0b1d7b2b8 i965: ignore quads for GS kernel on sandybridge
Sandybridge's VF would convert quads to polygon which not required
for GS then. Current GS state still would cause hang on lineloop.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 67dafa4b56 i965: ff sync message change for sandybridge 2010-09-28 15:58:20 +08:00
Zhenyu Wang fa589770e8 i965: fix point size setting in header on sandybridge 2010-09-28 15:58:20 +08:00
Zhenyu Wang 03218a0093 i965: force zero in clipper to ignore RTAIndex on sandybridge 2010-09-28 15:58:20 +08:00
Zhenyu Wang 41c31c2ebd i965: Fix color interpolation on sandybridge
Don't double store position in vertex attribute. This makes color
interpolation right by using barycentric coordinates.
2010-09-28 15:58:20 +08:00
Zhenyu Wang 8c31a4c3cf i965: enable accumulator update in PS kernel too on sandybridge
Accumulator update flag must be set for implicit update on sandybridge.
2010-09-28 15:58:19 +08:00
Zhenyu Wang b016a78b98 i965: new state dump for sandybridge
Dump new state object on sandybridge for cc viewport, clip viewport,
depth stencil, cc and blend state.
2010-09-28 15:58:19 +08:00
Zhenyu Wang bf60f35934 i965: disasm quarter and write enable instruction control on sandybridge 2010-09-28 15:58:19 +08:00
Eric Anholt fe2d4a5ea0 i965: Add support for POW in gen6 FS.
Fixes glsl-algebraic-pow-2 in brw_wm_glsl.c mode.
2010-09-28 15:58:19 +08:00
Eric Anholt 2f914053bc i965: Set up inputs to the fragment shader according to FP InputsRead.
Sending down data that doesn't get read doesn't make any sense, and
would make handling things like gl_FrontFacing and gl_PointCoord
harder.
2010-09-28 15:58:19 +08:00
Eric Anholt a66e9a4d86 i965: Add support for attribute interpolation on Sandybridge.
Things are simpler these days thanks to barycentric interpolation
parameters being handed in in the payload.
2010-09-28 15:58:19 +08:00
Vinson Lee 79d5657770 dri: Add GET_PROGRAM_NAME definition for Mac OS X. 2010-09-28 00:27:31 -07:00
Tom Stellard b3e95dc45c r300/compiler: Use rc_for_all_reads_src() in "dead constants" pass 2010-09-27 23:17:11 -07:00
Tom Stellard 40d256295c r300/compiler: radeon_remove_constants.c: fix indentation 2010-09-27 23:17:11 -07:00
Tom Stellard a716952184 r300/compiler: Print immediate values after "dead constants" pass 2010-09-27 23:17:11 -07:00
Tom Stellard 798355d429 r300/compiler: Add more helper functions for iterating through sources
rc_for_all_reads_src() and rc_pair_for_all_reads_arg() pass references to
instruction sources to the callback so they can be modified directly.
2010-09-27 23:17:11 -07:00
Dave Airlie 34dba5f05a r600g: fix db flush breaking config state 2010-09-28 14:32:13 +10:00
Marek Olšák e4fd65e9d7 r300g: fix swizzling of texture border color
NOTE: This is a candidate for the 7.9 branch.
2010-09-28 05:34:51 +02:00
Marek Olšák 13359e6a4b r300g: add support for 3D NPOT textures without mipmapping
The driver actually creates a 3D texture aligned to POT and does all
the magic with texture coordinates in the fragment shader. It first
emulates REPEAT and MIRRORED wrap modes in the fragment shader to get
the coordinates into the range [0, 1]. (already done for 2D NPOT)
Then it scales them to get the coordinates of the NPOT subtexture.

NPOT textures are now less of a lie and we can at least display
something meaningful even for the 3D ones.

Supported wrap modes:
- REPEAT
- MIRRORED_REPEAT
- CLAMP_TO_EDGE (NEAREST filtering only)
- MIRROR_CLAMP_TO_EDGE (NEAREST filtering only)
- The behavior of other CLAMP modes is undefined on borders, but they usually
  give results very close to CLAMP_TO_EDGE with mirroring working perfectly.

This fixes:
- piglit/fbo-3d
- piglit/tex3d-npot
2010-09-28 05:34:51 +02:00
Marek Olšák 7128e1625b r300/compiler: fix shadow sampling with swizzled coords
Taking the W component from coords directly ignores swizzling. Instead,
take the component which is mapped to W in the TEX instruction parameter.
The same for Z.

NOTE: This is a candidate for the 7.9 branch.
2010-09-28 05:34:51 +02:00
Marek Olšák c2ea7ffb0a r300/compiler: do not use copy propagation if SaturateMode is used
NOTE: This is a candidate for the 7.9 branch.
2010-09-28 05:34:51 +02:00
Marek Olšák 6f747567ec r300/compiler: fix projective mapping of 2D NPOT textures
NOTE: This is a candidate for the 7.9 branch.
2010-09-28 05:34:51 +02:00
Marek Olšák 82f8e43bfa r300g: code cleanups
Some random stuff I had here.

1) Fixed some misleading comments.
2) Removed fake_npot, since it's redundant.
3) lower_texture_rect -> scale_texcoords
4) Reordered and reindented some TEX transform code.
2010-09-28 05:34:51 +02:00
Eric Anholt 94d44c33c0 i965: Add support for dFdx()/dFdy() to the FS backend.
Fixes:
glsl-fwidth
glsl-derivs-swizzle
2010-09-27 18:31:53 -07:00
Eric Anholt 3610e0c1a0 i965: Fix vector splitting RHS channel selection with sparse writemasks.
Fixes:
glsl-fs-all-02
glsl-fs-dot-vec2
2010-09-27 18:29:15 -07:00
Eric Anholt 169ff0cc9d i965: Handle all_equal/any_nequal in the new FS.
These are generated for scalar operands instead of plain equal/nequal.
But for scalars, they're the same anyway.  +30 piglits.
2010-09-27 16:12:18 -07:00