summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add interface for driver queries like performance counters, etc.Marek Olšák2013-03-262-0/+23
| | | | | | | The pipe query interface is reused. The list of available queries can be obtained using pipe_screen::get_driver_query_info. Reviewed-by: Brian Paul <[email protected]>
* gallium,st/mesa: don't use blit-based transfers with software rasterizersMarek Olšák2013-03-231-1/+2
| | | | | | | | | The blit-based paths for TexImage, GetTexImage, and ReadPixels aren't very fast with software rasterizer. Now Gallium drivers have the ability to turn them off. Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* gallium: add TGSI_SEMANTIC_TEXCOORD,PCOORD v3Christoph Bumiller2013-03-203-3/+6
| | | | | | | | | | | | | | | 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-6/+18
| | | | | | | | | | | | | | 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]>
* tgsi: add ArrayID to declarationsChristian König2013-03-191-1/+7
| | | | | | | | Remember which declarations are declared as "arrays" and so can be indirectly addressed. ArrayIDs start at 1, cause for compatibility reasons zero is treaded as no array present. Signed-off-by: Christian König <[email protected]>
* tgsi: remove TGSI_FILE_(IMMEDIATE|TEMP)_ARRAYChristian König2013-03-191-4/+2
| | | | | | Nobody seems to be using it, and only nv50 had a partial implementation. Signed-off-by: Christian König <[email protected]>
* mesa,gallium,egl,mapi: One definition of C99 inline/__func__ to rule them all.José Fonseca2013-03-121-69/+5
| | | | | | | | We were in four already... NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* gallium: add red-alpha texture formats and a couple of util functionsMarek Olšák2013-02-131-0/+12
| | | | | | | | | This is for glGetTexImage and it will be used for samplers only (which some drivers already implement by reading util_format_description). v2: incorporate Brian's suggestion Reviewed-by: Brian Paul <[email protected]>
* gallium: add RGBX formats for existing GL RGB texture formatsMarek Olšák2013-02-071-0/+14
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: add SQRT shader opcodeBrian Paul2013-02-042-2/+3
| | | | | | | | | | | | | | | | | | The glsl-to-tgsi translater will emit SQRT to implement GLSL's sqrt() and distance() functions if the PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED query says it's supported by the driver. Otherwise, sqrt(x) is implemented with x*rsq(x). The problem with this is sqrt(0) must be handled specially because rsq(0) might be Inf/NaN/undefined (and then 0*rsq(0) is Inf/Nan/undefined). In the glsl-to-tgsi code we use an extra CMP to check if x is zero and then replace the result of x*rsq(x) with zero. In the end, this makes sqrt() generate much more reasonable code for drivers that can do square roots. Note that many of piglit's generated shader tests use the GLSL distance() function.
* gallium: add PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENTChristoph Bumiller2013-01-301-1/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATEMarek Olšák2013-01-151-1/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* 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.