summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915
Commit message (Collapse)AuthorAgeFilesLines
* i915g: Document fall-through switchStéphane Marchesin2013-09-061-4/+3
| | | | Fixes warning reported by Coverity.
* i915g: Handle i915->batch == NULL correctly in flushStéphane Marchesin2013-09-061-1/+4
| | | | Fixes warning reported by Coverity.
* i915g: Remove useless comparisonStéphane Marchesin2013-09-061-3/+2
| | | | Fixes "Macro compares unsigned to 0" defect reported by Coverity.
* i915g: Fix initial array indexStéphane Marchesin2013-09-061-1/+1
| | | | Fixes "Out-of-bounds read" defect reported by Coverity.
* i915g: Implement writemask fixupStéphane Marchesin2013-09-043-38/+90
| | | | | | | | | The fixup code emulates non-BGRA render targets by adding an extra instruction at the end of fragment shaders to swizzle the output. To do this, we also swizzle the blend function. However an oversight until now was that the writemask wasn't getting swizzled. This patch fixes that which fixes a bunch of piglit tests.
* i915g: Stop calling draw_prepare_shader_outputsStéphane Marchesin2013-09-041-2/+0
| | | | | It's not useful on i915g since we don't support primid. Fixes piglit point tests on i915g.
* i915g: Add more optimizationsStéphane Marchesin2013-09-043-58/+371
| | | | | | | | | This patch adds liveness analysis to i915g and a couple optimizations which benefit from it. One interesting optimization turns (fake) indirect texture accesses into direct texture accesses (the i915 supports a maximum of 4 indirect texture accesses). Among other things this fixes a bunch of piglit tests.
* draw: inject frontface info into wireframe outputsZack Rusin2013-08-021-0/+2
| | | | | | | | | | | | | | Draw module can decompose primitives into wireframe models, which is a fancy word for 'lines', unfortunately that decomposition means that we weren't able to preserve the original front-face info which could be derived from the original primitives (lines don't have a 'face'). To fix it allow draw module to inject a fake face semantic into outputs from which the backends can figure out the original frontfacing info of the primitives. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Add PIPE_CAP_ENDIANNESSTom Stellard2013-07-221-0/+2
| | | | | | Cc: [email protected] [ Francisco Jerez: Fix "PIPE_ENDIAN_SMALL" in the documentation, define PIPE_ENDIAN_NATIVE. ]
* tgsi: rename the TGSI fragment kill opcodesBrian Paul2013-07-122-7/+5
| | | | | | | | | | | | | | | | | | | | | TGSI_OPCODE_KIL and KILP had confusing names. The former was conditional kill (if any src component < 0). The later was unconditional kill. At one time KILP was supposed to work with NV-style condition codes/predicates but we never had that in TGSI. This patch renames both opcodes: TGSI_OPCODE_KIL -> KILL_IF (kill if src.xyzw < 0) TGSI_OPCODE_KILP -> KILL (unconditional kill) Note: I didn't just transpose the opcode names to help ensure that I didn't miss updating any code anywhere. I believe I've updated all the relevant code and comments but I'm not 100% sure that some drivers had this right in the first place. For example, the radeon driver might have llvm.AMDGPU.kill and llvm.AMDGPU.kilp mixed up. Driver authors should review their code. Reviewed-by: Jose Fonseca <[email protected]>
* mesa,glsl,gallium: remove GLSLSkipStrictMaxVaryingLimitCheck and dependenciesMarek Olšák2013-07-021-1/+0
| | | | | | Not needed with do_dead_builtin_varyings. Reviewed-by: Ian Romanick <[email protected]>
* gallium: Add support for multiple viewportsZack Rusin2013-05-251-5/+10
| | | | | | | | | | | | Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca<[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: try to prevent overflows on index buffersZack Rusin2013-05-141-2/+2
| | | | | | | | | | | | Pass in the size of the index buffer, when available, and use it to handle out of bounds conditions. The behavior in the case of an overflow needs to be the same as with other overflows in the vertex processing pipeline meaning that a vertex should still be generated but all attributes in it set to zero. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: don't crash on vertex buffer overflowZack Rusin2013-05-141-2/+2
| | | | | | | | | | | | | | We would crash when stride was bigger than the size of the buffer. The correct behavior is to just fetch zero's in this case. Unfortunatly with user_buffer's there's no way to validate the size because currently we're just not getting it. Adjust the draw interface to pass the size along the mapped buffer, which works perfectly for buffer backed vertex_buffers and, in future, it will allow us to plumb user_buffer sizes through the same interface. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* i915: Use Y tiling for texturesStéphane Marchesin2013-05-081-2/+7
| | | | | | | | | | | This basically reverts commit 2acc7193743199701f8f6d1877a59ece0ec4fa5b. With the previous change, we're not batchbuffer limited any longer. So we actually start seeing a performance difference between X and Y tiling. X tiling is funny because it is faster for screen-aligned quads but slower in games. So let's use Y tiling which is 10% faster overall.
* i915g: Optimize batchbuffer sizesStéphane Marchesin2013-05-081-3/+5
| | | | | | | Now that we don't throttle at every batchbuffer, we can shrink the size of batchbuffers to achieve early flushing. This gives a significant speed boost in a lot of games (on the order of 20%).
* i915g: Add more PIPE_CAP_* supportStéphane Marchesin2013-05-081-0/+9
|
* gallium: fix type of flags in pipe_context::flush()Chia-I Wu2013-05-042-3/+3
| | | | | | | | | | | | | | | | It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Marek Olšák <[email protected]> [olv: document the parameter now that the type is unsigned]
* st/mesa: optionally apply texture swizzle to border color v2Christoph Bumiller2013-04-181-0/+1
| | | | | | | | | | | | This is the only sane solution for nv50 and nvc0 (really, trust me), but since on other hardware the border colour is tightly coupled with texture state they'd have to undo the swizzle, so I've added a cap. The dependency of update_sampler on the texture updates was introduced to avoid doing the apply_depthmode to the swizzle twice. v2: Moved swizzling helper to u_format.c, extended the CAP to provide more accurate information.
* i915g: Release old fragment shader sampler views with current pipeStuart Abercrombie2013-04-171-3/+8
| | | | | | | We were trying to use a destroy method from a deleted context. This fix is based on what's in the svga driver. Reviewed-by: Stéphane Marchesin <[email protected]>
* gallium: add PIPE_CAP_QUERY_PIPELINE_STATISTICSChristoph Bumiller2013-04-031-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: add TGSI_SEMANTIC_TEXCOORD,PCOORD v3Christoph Bumiller2013-03-201-0/+2
| | | | | | | | | | | | | | | This makes it possible to identify gl_TexCoord and gl_PointCoord for drivers where sprite coordinate replacement is restricted. The new PIPE_CAP_TGSI_TEXCOORD decides whether these varyings should be hidden behind the GENERIC semantic or not. With this patch only nvc0 and nv30 will request that they be used. v2: introduce a CAP so other drivers don't have to bother with the new semantic v3: adapt to introduction gl_varying_slot enum
* tgsi: use separate structure for indirect address v2Christian König2013-03-191-4/+4
| | | | | | | | | | | | | | To further improve the optimization of source and destination indirect addressing we need the ability to store a reference to the declaration of the addressed operands. Since most of the fields in tgsi_src_register doesn't apply for an indirect addressing operand replace it with a separate tgsi_ind_register structure and so make room for extra information. v2: rename Declaration to ArrayID, put the ArrayID into () instead of [] Signed-off-by: Christian König <[email protected]>
* i915g: Use PIPE_FLUSH_END_OF_FRAME to trigger throttlingStéphane Marchesin2013-03-088-23/+36
| | | | | This helps with jittering, instead of throttling at every command buffer we only throttle once a frame.
* i915g: Update TODOStéphane Marchesin2013-03-081-12/+1
|
* gallium/drivers: handle PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED queryBrian Paul2013-02-041-0/+1
| | | | Initially, only softpipe/llvmpipe support SQRT.
* gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATEMarek Olšák2013-01-151-1/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* Remove hacks for static MakefilesMatt Turner2013-01-131-3/+0
| | | | | | | | | | | v2: Andreas Boll <[email protected]> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <[email protected]> - remove more obsolete hacks v4: Andreas Boll <[email protected]> - add a previously removed TOP variable to fix vgapi build
* Clean up .gitignore filesMatt Turner2013-01-101-1/+0
|
* i915g: Convert to automakeMatt Turner2013-01-103-9/+37
|
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-042-3/+4
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]>
* gallium: s/PIPE_CAP_TIMER_QUERY/PIPE_CAP_QUERY_TIME_ELAPSED/José Fonseca2012-12-201-1/+1
| | | | | | | | To better reflect what it is being advertised. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: remove pipe_surface::usageMarek Olšák2012-12-121-1/+0
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <[email protected]>
* gallivm,draw,llvmpipe: use base ptr + mip offsets instead of mip pointersRoland Scheidegger2012-11-121-6/+6
| | | | | | | | | This might have a slight overhead but handling mip offsets more like the width (and image) strides should make some things easier (mip level being just part of the offset calculation) later. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallium: expose ARB_map_buffer_alignment on RadeonMarek Olšák2012-10-311-0/+1
| | | | | | | | Reviewed-by: Brian Paul <[email protected]> v2: update relnotes-9.1 v3: use align_malloc and align_free for malloced buffers in r300g v4: document the new CAP in the docs
* gallium: add start_slot parameter to set_vertex_buffersMarek Olšák2012-10-312-7/+7
| | | | | | | | | | | | | | | | | | | | | This allows updating only a subrange of buffer bindings. set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that range. Binding NULL resources unbinds buffers too (both buffer and user_buffer must be NULL). The meta ops are adapted to only save, change, and restore the single slot they use. The cso_context can save and restore only one vertex buffer slot. The clients can query which one it is using cso_get_aux_vertex_buffer_slot. It's currently set to 0. (the Draw module breaks if it's set to non-zero) It should decrease the CPU overhead when using a lot of meta ops, but the drivers must be able to treat each vertex buffer slot as a separate state (only r600g does so at the moment). I can imagine this also being useful for optimizing some OpenGL use cases. Reviewed-by: Brian Paul <[email protected]>
* gallium: remove unused data pointer from pipe_transferMarek Olšák2012-10-181-1/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: unify transfer functionsMarek Olšák2012-10-113-81/+50
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <[email protected]>
* i915g: fix unused variable and type conversion warningsMarek Olšák2012-10-092-2/+1
|
* i915g: Don't clobber I915_NEW_FS on new framebuffer.Stéphane Marchesin2012-10-081-1/+1
| | | | This snuck in with a previous commit.
* i915g: Call draw_set_mapped_vertex_buffer from draw_vboStéphane Marchesin2012-10-062-15/+17
| | | | This regressed with the draw rework. Fixes glest and vdrift crash.
* i915g: Get rid of the fixup state functions.Stéphane Marchesin2012-10-053-48/+0
| | | | Now that the saved_* state is gone, we don't need those any longer.
* i915g: Remove the i915_context->saved_* stuff.Stéphane Marchesin2012-10-053-46/+23
| | | | | | | | | When using u_blitter, the state was being saved from saved_*, but we don't use that. So after u_blitter resumed we got some corrupted state in. So let's just remove the saved_* stuff. I thought it was weird but harmless, it's actually broken.
* i915g: Don't update I915_HW_PROGRAM in update_framebufferStéphane Marchesin2012-10-051-2/+2
| | | | It's already going to be updated in update_dst_buf_vars.
* Revert "i915g: Don't bind 0-length programs"Stéphane Marchesin2012-10-051-8/+2
| | | | This reverts commit 8c28a9bd733f5b51ab459c6bc626a5aaac5a6c0c.
* i915g: Don't bind 0-length programsStéphane Marchesin2012-10-041-2/+8
| | | | | | | | Since we started doing fixups for different render target formats, this has been an issue. Instead just don't do anything, when the program gets emitted later it'll get the correct fixup. Fixes a bunch of piglit tests.
* i915g: Implement srgb textures the easy way.Stéphane Marchesin2012-10-023-102/+9
| | | | | Since the hw can do it, let's use the hw. It's less accurate but doesn't have the shader instruction count shortcomings.
* i915g: Use X tiling for texturesStéphane Marchesin2012-10-021-7/+2
| | | | | This is what the classic driver does, and it allows faster texture uploads.
* i915g: implement blitMarek Olšák2012-09-302-23/+61
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: add gallium blit implementationMarek Olšák2012-09-301-2/+2
| | | | | | | The original blit function is extended and the otAher functions reuse it. Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>