summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* meta: Export _mesa_meta_drawbuffers_from_bitfield()Kristian Høgsberg2014-08-152-3/+6
| | | | | | | We'll use this in the i965 fast clear implementation. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* mesa: Use _mesa_lock_context_textures in _mesa_GetTexParameterfv()Kristian Høgsberg2014-08-151-3/+3
| | | | | | | | | | | | | | | | | | | GetTexParamterfv() doesnt change texture state, so instead of _mesa_lock_texture() we can use _mesa_lock_context_textures(), which doesn't increase the texture stamp. With this change, _mesa_update_state_locked() is now only called from under _mesa_lock_context_textures(), which is right thing to do. Right now it's the same mutex, but if we made texture locking more fine grained locking one day, just locking one texture here would be wrong. This all ignores the fact that texture locking seem a bit flaky and broken, but we're trying to not blatantly make it worse. This change allows us to reliably unlock the context textures in the dd::UpdateState callback as is necessary for meta color resolves. Signed-off-by: Kristian Høgsberg <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* i965: Move pre-draw resolve buffers to dd::UpdateStateKristian Høgsberg2014-08-152-40/+25
| | | | | | | | | | | No functional change except for glBegin/glEnd style rendering, where we now do the resolves at glBegin time instead of FLUSH_VERTICES time. This is also the reason for this change, so that when we later switch fast clear resolve to use meta, we won't be doing meta operations in the middle of a begin/end sequence. Signed-off-by: Kristian Høgsberg <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* i965: Provide a context flag to let us enable fast clearKristian Høgsberg2014-08-153-0/+5
| | | | | | | | | GEN7+ has the fast clear functionality, which lets us clear the color buffers using the MCS and a scaled down rectangle. To enable this we have to set the appropriate bits in the 3DSTATE_PS package. Signed-off-by: Kristian Høgsberg <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* i965: Disable clipping when rendering 3DPRIM_RECTLIST primitivesKristian Høgsberg2014-08-151-1/+7
| | | | | | | | The clipper doesn't support clipping 3DPRIM_RECTLIST primitives and must be turned off when we use them. Signed-off-by: Kristian Høgsberg <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* i965: Add a mechanism for sending native primitives into the driverKristian Høgsberg2014-08-154-5/+22
| | | | | | | | | | | The brw_draw_prims() function is the draw entry point into the driver, and takes struct _mesa_prim for input. We want to be able to feed native primitives into the driver, and to that end we introduce BRW_PRIM_OFFSET, which lets use describe geometry using the native GEN primitive types. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add context flag to disable the viewport transformKristian Høgsberg2014-08-155-5/+13
| | | | | | | | This lets us disable the viewport transform, which will be useful for emitting 3DPRIM_RECTLIST. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add an option to not generate the SIMD8 fragment shaderKristian Høgsberg2014-08-156-5/+19
| | | | | | | | | For now, this can only be triggered with a new 'no8' INTEL_DEBUG option and a new context flag. We'll use the context flag later, but introducing it now lets us bisect to this commit if it breaks something. Signed-off-by: Kristian Høgsberg <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* docs/autoconf: explicitly mention PKG_CONFIG_PATH for cross/multilib buildsEmil Velikov2014-08-151-3/+5
| | | | | | | ... and squash a couple of typos. Suggested-by: Eero Tamminen <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* st/dri: Add __DRI2rendererQueryExtension supportEmil Velikov2014-08-155-0/+88
| | | | | | | | | | | The final step to get GLX_MESA_query_renderer working with gallium drivers. v2: Remove __DRI2_RENDERER_PREFERRED_PROFILE handling. It's already handled in dri/common. Spotted by Marek. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/softpipe/llvmpipe: handle query_renderer capsEmil Velikov2014-08-152-0/+38
| | | | | | | | | | Both report 0xffffffff as both vendor and device id, and the maximum amount of system memory as video memory. v2: Use aux helper os_get_total_physical_memory(). Cc: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium/svga: handle query_rendered capsEmil Velikov2014-08-151-0/+12
| | | | | | | | | | | | All the values are are currently hardcoded. One could use some heuristics to determine the amount of video memory if a callback to the host is not available. Do we what to advertise the driver as hardwar accelerated ? Cc: Brian Paul <[email protected]> Cc: José Fonseca <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium/nouveau: handle query_renderer capsEmil Velikov2014-08-153-9/+61
| | | | Signed-off-by: Emil Velikov <[email protected]>
* gallium/vc4: handle query_renderer capsEmil Velikov2014-08-151-0/+12
| | | | | Cc: Eric Anholt <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium/r300/r600/radeonsi: handle query_renderer capsEmil Velikov2014-08-153-0/+33
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/ilo: handle query_renderer capsEmil Velikov2014-08-154-1/+38
| | | | | | | | | | | Implementation based on the classic driver with the following changes: - Use auxiliarry function os_get_total_physical_memory to get the total amount of memory. - Move the libdrm_intel specific get_aperture_size to the winsys. Cc: Chia-I Wu <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium/i915: handle query_renderer capsEmil Velikov2014-08-153-0/+40
| | | | | | | | | | | Implementation based on the classic driver with the following changes: - Use auxiliarry function os_get_total_physical_memory to get the total amount of memory. - Move the libdrm_intel specific get_aperture_size to the winsys. Cc: Stephane Marchesin <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium/freedreno: handle query_renderer capsEmil Velikov2014-08-151-0/+12
| | | | | | | | | | Provide the real vendor and and hardcode the device id as 0xffffffff as the devices currently using freedreno are non-pci. The device features UMA. Cc: Rob Clark <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* auxiliary/os: introduce os_get_total_physical_memory helper functionEmil Velikov2014-08-152-0/+71
| | | | | Cc: Alexander von Gluck IV <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium: add GLX_MESA_query_renderer capsEmil Velikov2014-08-152-0/+13
| | | | | | | | Namely vendor/device id, accelerated and UMA, which will be used to describe the underlying renderer. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* dri/swrast: add GLX_MESA_query_renderer supportEmil Velikov2014-08-151-2/+71
| | | | | | | | | v2: - Drop __DRI2_RENDERER_PREFERRED_PROFILE case. - Cleanup return statements. Cc: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* dri/radeon: add GLX_MESA_query_renderer supportEmil Velikov2014-08-154-21/+103
| | | | | | | | | | - Create radeon{Vendor,GetRenderer}String helpers. - Drop __DRI2_RENDERER_PREFERRED_PROFILE case. - Cleanup return statements. To be used by the upcomming GLX_MESA_query_renderer implementation. Signed-off-by: Emil Velikov <[email protected]>
* dri/radeon: don't print TCL status on glGetString(GL_RENDERER)Emil Velikov2014-08-151-7/+2
| | | | | | | | | | Printing the TCL involves that context is available at the time of query. The GLX_MESA_query_renderer states that glGetString(GL_RENDERER) and glXQueryRendererStringMESA(GLX_RENDERER_DEVICE_ID_MESA) will have the same format, thus removing the context dependenicy will help us achieve that. Signed-off-by: Emil Velikov <[email protected]>
* dri/nouveau: add GLX_MESA_query_renderer supportEmil Velikov2014-08-153-19/+92
| | | | | | | | - Create nouveau_{vendor,get_renderer}_string helpers. - Set correct max_gl*version. - Query the device PCIID via libdrm_nouveau/nouveau_getparam. Signed-off-by: Emil Velikov <[email protected]>
* dri/common: Move __DRI2_RENDERER_PREFFERED_PROFILE handling to ↵Emil Velikov2014-08-153-7/+4
| | | | | | | | | | | | driQueryRendererIntegerCommon Essentially all drivers would like to use to opengl core profile if available, so avoid duplication by moving the code to a common fallback within driQueryRendererIntegerCommon. If a driver uses different approach they can handle it separately. Signed-off-by: Emil Velikov <[email protected]>
* glx/drisw: add support for DRI2rendererQueryExtensionEmil Velikov2014-08-153-2/+58
| | | | | | | | | | The extension is used by GLX_MESA_query_renderer, which can be provided for by hardware and software drivers. v2: Use designated initializers. v3: Move drisw_query_renderer_*() to dri2_query_renderer.c Signed-off-by: Emil Velikov <[email protected]>
* glx/dri2: use mapping table for dri2_convert_glx_query_renderer_attribs()Emil Velikov2014-08-151-26/+28
| | | | Signed-off-by: Emil Velikov <[email protected]>
* glx/drisw: Move private structure declarations to a header fileEmil Velikov2014-08-152-40/+65
| | | | | | v2: Reff the correct file wrt copyright, spotted by Chia-I Signed-off-by: Emil Velikov <[email protected]>
* mesa: check if GL_ARB_copy_image is enabled in _mesa_CopyImageSubData()Brian Paul2014-08-151-1/+7
| | | | | | | | | | Generate a GL error and return rather than crashing on a null ctx->Driver.CopyImageSubData pointer (gallium). This allows apitraces with glCopyImageSubData() calls to continue rather than crash. Plus, fix a comment typo. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/blorp_clear: Use memcpy instead of assignment to copy clear valueNeil Roberts2014-08-151-7/+2
| | | | | | | | | | | | | | Similar to the problem described in 2c50212b14da27de4e3, if we copy the clear value through a regular assignment via a floating point value, then if an integer clear value is being used that happens to contain a signalling NaN value then it would get converted to a quiet NaN when stored via the x87 floating-point registers. This would corrupt the integer value. Instead we should use a memcpy to ensure the exact bit representation is preserved. This bug can be triggered on 32-bit builds with optimisations by using an integer clear color with a value like 0x7f817f81. Reviewed-by: Matt Turner <[email protected]>
* r600g: Implement ARB_derivative_controlGlenn Kennard2014-08-154-12/+14
| | | | | | | | | Requires Evergreen/Cayman marek: update release notes Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* docs: Update relnotes for ARB_gpu_shader5Chris Forbes2014-08-151-1/+1
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* docs: Mark off ARB_gpu_shader5 for i965Chris Forbes2014-08-151-9/+9
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Enable ARB_gpu_shader5 on Gen7Chris Forbes2014-08-151-0/+3
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Add support for nonconst sampler indexing in FS visitorChris Forbes2014-08-152-9/+55
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add support for non-const sampler indices in generatorChris Forbes2014-08-151-1/+51
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Refactor generate_tex in prep for nonconst sampler indexingChris Forbes2014-08-151-22/+25
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Use brw_adjust_sampler_state_pointer in fs generator tooChris Forbes2014-08-151-16/+1
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Add support for nonconst sampler indexing in VS visitorChris Forbes2014-08-152-6/+50
| | | | | | | | V2: Set force_writemask_all on ADD; this *is* necessary in the VS case too. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Add support for non-const sampler indices in generatorChris Forbes2014-08-151-1/+51
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Generalize sampler state pointer mangling for non-constChris Forbes2014-08-151-1/+13
| | | | | | | | | | For now, assume that the addressed sampler can be in any of the 16-sampler banks. If we preserved range information this far, we could avoid emitting these instructions if the sampler were known to be contained within one bank. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Refactor generate_tex in prep for non-const samplersChris Forbes2014-08-151-22/+25
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Extract helper function for surface state pointer adjustmentChris Forbes2014-08-153-16/+41
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* docs: Mark off ARB_gpu_shader5 UBO array indexing for i965Chris Forbes2014-08-151-1/+1
| | | | Signed-off-by: Chris Forbes <[email protected]>
* i965/vec4: Add visitor support for nonconst ubo block indexingChris Forbes2014-08-151-3/+26
| | | | Signed-off-by: Chris Forbes <[email protected]>
* i965/vec4: Generate indirect sends for nonconstant UBO array accessChris Forbes2014-08-151-15/+62
| | | | Signed-off-by: Chris Forbes <[email protected]>
* i965/fs: Add visitor support for nonconstant UBO indicesChris Forbes2014-08-151-3/+27
| | | | Signed-off-by: Chris Forbes <[email protected]>
* i965/fs: Generate indirect sends for nonconstant UBO array accessesChris Forbes2014-08-151-39/+135
| | | | Signed-off-by: Chris Forbes <[email protected]>
* i965: Adjust set_message_descriptor to handle non-sendsChris Forbes2014-08-151-1/+13
| | | | | | | | | | We're about to be using this infrastructure to build descriptors in src1 of non-send instructions, when preparing to do an indirect send. Don't accidentally clobber the conditionalmod field of those instructions with SFID bits, which aren't part of the descriptor. Signed-off-by: Chris Forbes <[email protected]>
* i965: Add low-level support for indirect sendsChris Forbes2014-08-152-0/+20
| | | | | | | This provides a reasonable place to enforce the hardware restriction that indirect descriptors must be in a0.0 Signed-off-by: Chris Forbes <[email protected]>