summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
Commit message (Collapse)AuthorAgeFilesLines
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-043-2/+11
| | | | | | | | | | | | | | | | | 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]>
* gallium: add new texture buffer object capabilityDave Airlie2012-12-081-1/+2
| | | | | | this just adds the define to the header. Signed-off-by: Dave Airlie <[email protected]>
* gallium: pass the current context to the flush_front state tracker functionMarek Olšák2012-12-071-1/+4
| | | | | | I will later use the context to resolve an MSAA front buffer. Reviewed-by: Brian Paul <[email protected]>
* gallium/postprocess: share pipe_context and cso_context with the state trackerMarek Olšák2012-11-291-0/+11
| | | | | | | Using one context instead of two is more efficient and we can skip another context flush. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: allow forward-compatible contexts and set Const.ContextFlagsMarek Olšák2012-11-291-2/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gallium: fix some function comments in p_context.hDmitry Cherkassov2012-11-151-3/+2
| | | | | Signed-off-by: Dmitry Cherkassov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: add defines/shader opcode for texture cube map arrayDave Airlie2012-11-092-4/+13
| | | | | | | | | | | | | | | | This just adds the texture target and capability along with 3 new opcodes required to support this extension. As this extension requires some texture opcodes with samp + 5 args, we need to use another src register, this is only required for TEX, TXL and TXB opcodes to implement this spec. TEX2 is required for shadow cube map arrays TXL2 is required for cube map array sampler + explicit lod TXB2 is required for cube map array sampler + lod bias Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: expose ARB_map_buffer_alignment on RadeonMarek Olšák2012-10-311-1/+2
| | | | | | | | 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-311-0/+1
| | | | | | | | | | | | | | | | | | | | | 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]>
* mesa: bump MAX_VARYING to 32Marek Olšák2012-10-291-2/+2
| | | | | | | | | | | | | | | | | We're starting to get apps utilizing more than 16 varyings and most current hardware supports 32 anyway. Tested with r600g. swrast, softpipe and llvmpipe still advertise 16 varyings. This fixes a WebGL crash after launching this demo: https://developer.mozilla.org/en-US/demos/detail/falling-cubes Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54402 NOTE: This is a candidate for the stable branches. Acked-by: Kenneth Graunke <[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-112-19/+18
| | | | | | | | | | | | | | "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]>
* gallium: remove resource_resolveMarek Olšák2012-09-302-34/+1
| | | | | | | The functionality is provided by the new blit function. Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: add blit into the interfaceMarek Olšák2012-09-302-0/+28
| | | | | Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: add PIPE_CAP_TEXTURE_MULTISAMPLEMarek Olšák2012-09-301-1/+2
| | | | | Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Add PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE v2Tom Stellard2012-09-251-1/+2
| | | | | | v2: - Add comment in screen.rst - Report OpenCL required minimum for r600g
* clover: Handle multiple kernels in the same program v2Blaž Tomažič2012-09-251-0/+4
| | | | | | | | v2: Tom Stellard - Use pc parameter of launch_grid() Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* gallium: mention PIPE_TIMEOUT_INFINITE in the fence_finish() commentBrian Paul2012-09-201-1/+1
|
* gallium: add new pipe_screen::can_create_resource() functionBrian Paul2012-09-171-0/+8
| | | | | | | | | | Used to implement proxy textures. If a gallium driver doesn't implement this function we'll just continue to use the core Mesa fallback code. Without this hook we really have no good way to implement OpenGL proxy textures with gallium drivers. Reviewed-by: Jose Fonseca <[email protected]>
* util: Add cpuid for Solaris Studio.Vinson Lee2012-09-031-0/+4
| | | | | Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: accept and handle configuration options from st/driVadim Girlin2012-08-231-0/+14
| | | | | | Currently there is a single option - force_glsl_extensions_warn. Signed-off-by: Vadim Girlin <[email protected]>
* gallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #defineBrian Paul2012-08-161-2/+0
| | | | | | | | | | | | PIPE_MAX_SAMPLERS, PIPE_MAX_VERTEX_SAMPLERS and PIPE_MAX_GEOMETRY_SAMPLERS were all defined to the same value (16). In various places we're creating arrays such as sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] so we were assuming the same number of max samplers for all shader stages anyway. Of course, drivers are still free to advertise different numbers of max samplers for different shaders.
* gallium: add TGSI support for multisample texturesMarek Olšák2012-08-151-2/+5
| | | | | | | | | | The only allowed instructions are TXQ_LZ and TXF. TXQ_LZ is like TXQ, but without the LOD parameter (which is always zero with MSAA textures) The 3rd or the 4th texcoord component in TXF should contain the sample index for a 2D_MSAA or 2D_ARRAY_MSAA texture, respectively.
* gallium: make pipe_box signed in order to represent flipped blitsMarek Olšák2012-08-151-6/+6
| | | | This will be used by u_blitter.
* gallium: define PIPE_MASK_RGBAZSMarek Olšák2012-08-041-0/+1
| | | | | | I need this and it seems like it could be useful. Reviewed-by: Brian Paul <[email protected]>
* Revert "gallium: specify resource_resolve destination via a pipe_surface"Christoph Bumiller2012-08-011-2/+4
| | | | | | | | | | | This reverts commit 5d5af7d359e0060fa00b90a8f04900b96f9058b0. It turns out the issue this was supposed to fix merely counter-acted a bug in the hardware driver that I wasn't aware of. The resource_resolve is not supposed to do sRGB conversion, period. (This would violate the requirement that source and destination must be of the same format).
* gallium: specify resource_resolve destination via a pipe_surfaceChristoph Bumiller2012-07-281-4/+2
| | | | | | | | | | | The format member of pipe_surface may differ from that of the pipe_resource, which is used to communicate, for instance, whether sRGB encode should be enabled in the resolve operation or not. Fixes resolve to sRGB surfaces in mesa/st when GL_FRAMEBUFFER_SRGB is disabled. Reviewed-by: Brian Paul <[email protected]>
* gallium: add QUERY_TIMESTAMP cap and get_timestamp screen functionMarek Olšák2012-07-102-1/+9
|
* gallium: minor whitespace, comment changesBrian Paul2012-06-271-3/+1
|
* gallium: Add PIPE_CAP_START_INSTANCEFredrik Höglund2012-06-191-1/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: Add support for Solaris Studio C++ compiler.Vinson Lee2012-06-181-1/+5
| | | | | Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Add struct pipe_llvm_program_header v3Tom Stellard2012-06-011-0/+8
| | | | | | | | | | | | | | This structure is used as a header that precedes LLVM bytecode programs that are passed to the drivers. v2: - s/pipe_compute_program/pipe_llvm_program/ v3: - Rename to struct pipe_llvm_program_header - Drop the char * prog member Reviewed-by: Francisco Jerez <[email protected]>
* gallium/compute: Add PIPE_COMPUTE_CAP_IR_TARGET v4Francisco Jerez2012-06-011-0/+1
| | | | | | | | | | | | | v2: Tom Stellard - Update CAP description v3: Tom Stellard - TGSI targets should pass an empty string for this CAP. v4: Tom Stellard - TGSI targets can ignore this CAP. Reviewed-by: Francisco Jerez <[email protected]>
* gallium: Add PIPE_SHADER_IR_LLVM to enum pipe_shader_ir v2Tom Stellard2012-06-011-1/+2
| | | | | | | v2: - s/PIPE_SHADER_IR_LLVM_R600/PIPE_SHADER_IR_LLVM/ Reviewed-by: Francisco Jerez <[email protected]>
* gallium: add st_api feature mask to prevent advertising MS visualsChristoph Bumiller2012-05-291-0/+16
| | | | | | | | | | | | | | v2: use a define for the maximum sample count v3: also test odd sample counts (r300 supports MS3) While multisample renderbuffers are supported by mesa, MS visuals are not, so we need a way to tell dri/st not to advertise them even if the gallium driver does support multisampled surfaces. Otherwise applications selecting these non-functional visuals would run into trouble ... Reviewed-by: Brian Paul <[email protected]>
* gallium: remove user_buffer_create from the interfaceMarek Olšák2012-05-121-26/+0
| | | | Nothing uses it now.
* clover, gallium: add PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCKChristoph Bumiller2012-05-121-0/+1
| | | | | | | This is not necessarily the product of MAX_BLOCK_SIZE[i]. Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* Merge branch 'gallium-userbuf'Marek Olšák2012-05-113-14/+20
|\ | | | | | | | | | | | | | | Conflicts: src/gallium/docs/source/screen.rst src/gallium/drivers/nv50/nv50_state.c src/gallium/include/pipe/p_defines.h src/mesa/state_tracker/st_draw.c
| * gallium: remove pipe_resource::user_ptrMarek Olšák2012-04-301-3/+0
| | | | | | | | It's unused now.
| * gallium: add void *user_buffer to pipe_constant_bufferMarek Olšák2012-04-301-0/+1
| | | | | | | | This reduces CPU overhead when updating constants.
| * gallium: add void *user_buffer in pipe_index_bufferMarek Olšák2012-04-301-0/+1
| | | | | | | | | | | | | | Adapted drivers: i915, llvmpipe, r300, r600, radeonsi, softpipe. User index buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
| * gallium: remove pipe_context::redefine_user_bufferMarek Olšák2012-04-301-9/+0
| |
| * gallium: add void *user_buffer in pipe_vertex_bufferMarek Olšák2012-04-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reduces CPU overhead in st_draw_vbo and removes a lot of unnecessary code in that function which was required only to comply with the gallium interface, but wasn't any useful really. Adapted drivers: i915, llvmpipe, r300, softpipe. No changes required in: r600, radeonsi. User vertex buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
| * gallium: change set_constant_buffer to be UBO-friendlyMarek Olšák2012-04-302-1/+13
| |
| * gallium: add PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENTMarek Olšák2012-04-301-1/+2
| | | | | | | | | | | | | | | | This is required for any serious constant buffer support. Constant buffer offsets on ATI and NVIDIA DX10 and DX11 GPUs must be a multiple of 256. In OpenGL, this can be queried via GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT.
| * gallium: add PIPE_CAP_USER_INDEX_BUFFERS and PIPE_CAP_USER_CONSTANT_BUFFERSMarek Olšák2012-04-301-0/+2
| |
* | gallium/tgsi: s/TGSI_BUFFER/TGSI_TEXTURE_BUFFER/José Fonseca2012-05-111-1/+1
| | | | | | | | | | | | For consistency. Reviewed-by: Brian Paul <[email protected]>
* | gallium/tgsi: Redefine the TGSI_TEXTURE_UNKNOWN texture target.José Fonseca2012-05-111-1/+2
| | | | | | | | | | | | | | | | | | Some code relies on the existing of an invalid texture target. It seems safer to bring it back than to deal with unintended consequences. This partially reverts commit a4ebb04214bab1cd9bd41967232ec89441e31744. Reviewed-by: Brian Paul <[email protected]>