aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* i965: Merge brw_validate_state() and brw_upload_state() together.Eric Anholt2011-10-293-19/+5
| | | | | | | They were called back-to-back at this point. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Remove state upload code for calling prepare() now that there are none.Eric Anholt2011-10-291-20/+3
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Remove some old texturing debug code.Eric Anholt2011-10-293-21/+0
| | | | | | | | | | It caught one possible bug I recall in my time working on the driver, and we haven't been setting it for non-fixed-function since the new FS backend came along. The bug it caught was likely a confusion about sampler mappings, which we have tests for these days. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Finally, move the global fallbacks check to emit() time.Eric Anholt2011-10-291-1/+1
| | | | | | | | This was the last prepare() function, and it's the first state atom, so it must be ready to move. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move index buffer upload to emit() time.Eric Anholt2011-10-291-2/+2
| | | | | | | It's consumed by the brw_emit_index_buffer() code at emit() time. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Do a hack job of merging VB prepare()/emit() together.Eric Anholt2011-10-291-1/+2
| | | | | | | | | I don't really want to touch this impenetrable code in this series, so just call the one function from the other, since no other atom cares about them. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move the WM input sizes calculation to emit() time.Eric Anholt2011-10-291-1/+1
| | | | | | | It's used for program compile. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move program compile to emit() time.Eric Anholt2011-10-295-9/+13
| | | | | | | Only 4 other prepare() functions are left, which don't rely on this. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Move CURBE offset calculation to emit() time.Eric Anholt2011-10-291-1/+1
| | | | | | | This is consumed by the unit state. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Fold push constant prepare()/emit() together.Eric Anholt2011-10-291-13/+9
| | | | | | | | While other units need to know about our constant buffer offsets, nothing else cared about which particular BO other than the emit() half. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen6: Move viewport state setup to emit() time.Eric Anholt2011-10-291-4/+4
| | | | | | | | Only the emit() for the pointers into the batch later in this file cares. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Move URB fence recalculate to emit() time.Eric Anholt2011-10-291-1/+1
| | | | | | | This is used by the unit state, which is at emit() time. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Fold the gen6/7 URB state prepare()/emit() together.Eric Anholt2011-10-292-18/+6
| | | | | | | No other unit cares about the prepare state, unlike gen4-5. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move VS pull constant upload to emit() time.Eric Anholt2011-10-291-2/+2
| | | | | | | Only needed by the emit() for VS surfaces. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Fold prepare() and emit() of VS surface state setup together.Eric Anholt2011-10-291-37/+25
| | | | | | | | This rearranges the code a bit, and makes the upload of the binding table take only as many surfaces as there are in use. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move WM pull constant setup to emit() time.Eric Anholt2011-10-291-2/+2
| | | | | | | It's needed by the WM surface state setup, which is now emit(). Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen7: Fold WM surface state prepare()/emit() together.Eric Anholt2011-10-291-38/+18
| | | | | | | | | | | These produce BRW_NEW_SURFACES (used by binding table emit()) and BRW_NEW_NR_WM_SURFACES (used by WM unit emit()). Fixes a bug where with no texturing and no color buffer, we wouldn't consider the null renderbuffer in nr_surfaces. This was harmless because nr_surfaces is only used for the prefetch info in the unit state. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Fold WM surface state prepare()/emit() together.Eric Anholt2011-10-291-36/+18
| | | | | | | | | | | These produce BRW_NEW_SURFACES (used by binding table emit()) and BRW_NEW_NR_WM_SURFACES (used by WM unit emit()). Fixes a bug where with no texturing and no color buffer, we wouldn't consider the null renderbuffer in nr_surfaces. This was harmless because nr_surfaces is only used for the prefetch info in the unit state. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move sampler state to emit() time.Eric Anholt2011-10-292-4/+4
| | | | | | | This is consumed by the WM unit, which is already at emit(). Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Move unit state setup to emit() time.Eric Anholt2011-10-296-10/+11
| | | | | | | It is only needed in time for brw_psp_urb_cbs(), which is also an emit(). Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen7: Fold prepare() and emit() of SF CLIP/VP state together.Eric Anholt2011-10-291-9/+4
| | | | | | | The prepare() only made state for its emit(), not anybody else. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen4: Move CC VP to emit() time, since it's only needed by CC's emit().Eric Anholt2011-10-291-2/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Move push constants setup to emit() time.Eric Anholt2011-10-292-6/+6
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965/gen6: Move setup of CC state batches to emit time.Eric Anholt2011-10-292-6/+6
| | | | | | | | | | This is part of a series trying to eliminate the separate prepare() hook in state upload. The prepare() hook existed to support the check_aperture in between calculating state updates and setting up the batch, but there should be no reason for that any more. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Check Fallback again after upload.Eric Anholt2011-10-291-1/+6
| | | | | | | | As we move state to emit() time from prepare() time, a couple of the places that flag fallbacks will move here. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Remove the validated BO list, now that it's unused.Eric Anholt2011-10-2912-109/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Use the batch save/reset code to avoid needing the BO validate step.Eric Anholt2011-10-291-33/+27
| | | | | | | | | | | | | | | | | | We were doing the BO validate step in prepare() (brw_validate_state()) hooks of atoms so that we could check_aperture before emitting the relocation trees during brw_upload_state() that would actually make the batchbuffer reference too much memory to be executed. Now that all relocations occur in the batchbuffer, we can instead check_aperture after emitting our state into the batchbuffer, and easily roll back, flush, and retry if we happened to go over the limits. This will let us remove the whole prepare() vs emit() split in our state atoms, which is a source of tricky dependencies and duplicated code. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* intel: Return error value from intel_batchbuffer_flush().Eric Anholt2011-10-292-6/+12
| | | | | | | This will let the caller do something sensible on error, if it cares. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i965: Add a note about an unsafe-looking state check.Eric Anholt2011-10-291-0/+5
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* intel: Add an interface for saving/restoring the batchbuffer state.Eric Anholt2011-10-293-0/+28
| | | | | | | | | | This will be used to avoid the prepare() step in the i965 driver's state setup. Instead, we can just speculatively emit the primitive into the batchbuffer, then check if the batch is too big, rollback and flush, and replay the primitive. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* i915: Move the always_flush_cache code to triangle emit.Eric Anholt2011-10-292-4/+8
| | | | | | | | | | | This could have broken always_flush_cache on i965, since reserved_space doesn't reflect the size of the workaround flushes, and we might run out of space. This should make always_flush_cache more useful on pre-i965, anyway (since the point is to flush around each draw call, even within a batchbuffer). Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* radeon/r200: forgot one somehowDave Airlie2011-10-291-1/+2
| | | | drops last usage.
* radeon/r200: drop remains of non-libdrm_radeon buildDave Airlie2011-10-2914-351/+4
| | | | | | These wrappers and associated symlinks were from the non-libdrm_radeon build. Signed-off-by: Dave Airlie <[email protected]>
* mesa/st: get interpolation mode from the fragment shader.Dave Airlie2011-10-291-1/+15
| | | | | | | | | With the recent changes to interpolation stuff, we can now get the value direct from the program instead of just being fail. fixes some of the glsl-1.30 interpolation tests with softpipe Signed-off-by: Dave Airlie <[email protected]>
* ir_to_mesa: Let check_resources halt compilationIan Romanick2011-10-281-6/+17
| | | | | | | | | | | | | | | | Previously check_resources could fail, but we'd still try to optimize the shader, do device-specific code generation, etc. In some cases, this could explode (especially in the device-specific code generation). I haven't found that I could trigger this with the current code. When too many samplers were used with the new uniform handling code, I observed several crashes deep down in the driver. NOTE: This is candidate for the 7.11 branch. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41609 Cc: Eric Anholt <[email protected]> Reviewed-and-tested-by: Kenneth Graunke <[email protected]>
* i965: Use glsl_type::column_type instead of open-coding itIan Romanick2011-10-281-3/+1
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* r300c/compiler: remove the compiler tooMarek Olšák2011-10-2861-17084/+0
| | | | Gallium has a fork of this.
* i965/fs: Use the actual hardware g0 register for texel offset setup.Kenneth Graunke2011-10-281-1/+1
| | | | | | | | | | | | | | | | | | The idea here is to set up the message header with the Sampler State pointer which the hardware provides as part of the PS Thread Payload in register g0. Unfortunately, the existing code fs_reg(GRF, 0, BRW_REGISTER_TYPE_UD)) actually references "virtual GRF 0" rather than the hardware g0. This is just some arbitrary GRF temporary which will get register allocated. So, we ended up setting up the header with garbage. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't do [0, 1] clamping on glGetTexImage() of packed float formats.Eric Anholt2011-10-281-4/+6
| | | | | | | | | | | | | | | | | | | | From the GL_EXT_packed_float spec: For an RGBA color, if <type> is not one of FLOAT, UNSIGNED_INT_5_9_9_9_REV_EXT, or UNSIGNED_INT_10F_11F_11F_REV_EXT, or if the CLAMP_READ_COLOR_ARB is TRUE, or CLAMP_READ_COLOR_ARB is FIXED_ONLY_ARB and the selected color (or texture) buffer is a fixed-point buffer, each component is first clamped to [0,1]. Then the appropriate conversion formula from table 4.7 is applied the component." (but we previously resolved that the CLAMP_READ_COLOR bit is not relevant to glGetTexImage()) This fixes most of the cases in piglit GL_EXT_packed_float/pack. Reviewed-by: Marek Ol ák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* radeon: Remove the non-libdrm kernel memory manager support.Eric Anholt2011-10-288-464/+2
| | | | We should have never been building this at this point.
* radeon: Insist on libdrm being present to build.Eric Anholt2011-10-283-98/+3
| | | | | | | There's no sense in building a broken driver. Previously, there was the potential of building a DRI1-only driver that would work for DRI1 and fail on DRI2 because the newer libdrm code wasn't present. Now the radeon build system should be matching intel and nouveau.
* dri: Remove driver GenerateMipmap hooks.Eric Anholt2011-10-284-67/+0
| | | | | Mesa sets up _mesa_meta_GenerateMipmap as the default hook, which does this check for fallback and call the fallback itself.
* radeon: Drop some remaining DRI1 vblank support code.Eric Anholt2011-10-283-58/+0
|
* intel: remove dead prototype for old DRI1 code.Eric Anholt2011-10-281-5/+0
| | | | Noticed while grepping for radeon code.
* radeon: Simplify cliprects computation now that there's just 1.Eric Anholt2011-10-283-69/+15
| | | | | | This can probably be reduced even further by moving this logic to the scissor state update or just removing the logic entirely, but I don't trust myself in radeon quite that much.
* radeon: Drop the clipping in spans, now that we always have (0,0) -> (w,h).Eric Anholt2011-10-281-54/+38
|
* radeon: Drop the legacy BO manager code.Eric Anholt2011-10-287-988/+0
|
* radeon: Drop the DRI1 zero-copy TFP code.Eric Anholt2011-10-285-92/+0
|
* radeon: Drop the radeon_cs_legacy code now that we rely on kernel mm.Eric Anholt2011-10-286-458/+0
|
* radeon: Drop dri2 checks now that it's always true.Eric Anholt2011-10-2816-349/+0
| | | | This makes LOCK_HARDWARE empty, so it goes away.