summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: implement glFramebufferTextureJordan Justen2013-05-012-0/+20
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add Layered field to framebuffersJordan Justen2013-05-012-0/+22
| | | | | | | | | | | When checking framebuffer completeness, we test each attachment. We verify that all attachments are consistent in terms of layers. 1. They must all be layered, or all non-layered 2. If they are layered, they must match in depth Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add renderbuffer attachment Layered fieldJordan Justen2013-05-013-8/+12
| | | | | | | | If glFramebufferTexture is used, then the framebuffer attachment is layered. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add renderbuffer Depth fieldJordan Justen2013-05-012-0/+2
| | | | | | | | | | With glFramebufferTexture, a renderbuffer may support all layers of the texture, so we need the depth of the renderbuffer to check for consistency which is required for framebuffer completeness. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* scons: remove IN_DRI_DRIVERAndreas Boll2013-05-011-1/+0
| | | | Not used anymore.
* build: remove unused API_DEFINESAndreas Boll2013-05-0114-15/+5
| | | | Reviewed-by: Matt Turner <[email protected]>
* intel: use automake conditionals for defining FEATURE_{ES1,ES2}Andreas Boll2013-05-012-2/+20
| | | | | | Removes the need of API_DEFINES. Reviewed-by: Matt Turner <[email protected]>
* intel: remove executable bit from C fileAndreas Boll2013-05-011-0/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* vbo: fix possible use-after-free segfault after a VAO is deletedMarek Olšák2013-05-013-4/+25
| | | | | | | | | | | | | This like the fifth attempt to fix the issue. Also with the new "validating" flag, we can set recalculate_inputs to FALSE earlier in vbo_bind_arrays, because _mesa_update_state won't change it. NOTE: This is a candidate for the stable branches. v2: fixed a typo Reviewed-by: Brian Paul <[email protected]>
* i965/vs: Fix textureGrad() with shadow samplers on Haswell.Kenneth Graunke2013-05-011-2/+8
| | | | | | | | | | | | The shadow comparitor needs to be loaded into the Z component of the last DWord. Fixes es3conform's shadow_execution_vert and oglconform's shadow-grad advanced.textureGrad.1D tests on Haswell. NOTE: This is a candidate for stable branches. Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Lower textureGrad() for samplerCubeShadow.Kenneth Graunke2013-05-013-6/+27
| | | | | | | | | | | | | | | | | | | | | | | According to the Ivybridge PRM, Volume 4 Part 1, page 130, in the section for the sample_d message: "The r coordinate contains the faceid, and the r gradients are ignored by hardware." This doesn't match GLSL, which provides gradients for all of the coordinates. So we would need to do some math to compute the face ID before using sample_d. We currently don't have any code to do that. However, we do have a lowering pass that converts textureGrad to textureLod, which solves this problem. Since textureGrad on three components is sufficiently obscure, it's not a performance path. For now, only handle samplerCubeShadow; we need tests for samplerCube and samplerCubeArray. Fixes es3conform's shadow_comparison_frag test on Haswell. NOTE: This is a candidate for stable branches. Signed-off-by: Kenneth Graunke <[email protected]>
* swrast: add casts for ImageSlices pointer arithmeticBrian Paul2013-05-012-4/+4
| | | | | | MSVC doesn't like pointer arithmetic with void * so use GLubyte *. Reviewed-by: Jose Fonseca<[email protected]>
* i965: Stop passing num_samples to intel_miptree_alloc_hiz().Paul Berry2013-04-303-8/+6
| | | | | | | | | | | | | The number of samples is already available in the miptree data structure, so there's no need to pass it in. I suspect this may fix a subtle bug because in one case (intel_renderbuffer_update_wrapper) we were always passing zero for num_samples, even though the buffer in question was not guaranteed to be single-sampled. But I wasn't able to find a failing test case. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Implement color clears using a simple shader in blorp.Eric Anholt2013-04-308-14/+344
| | | | | | | | | | | | | | | | | | | | | | | The upside is less CPU overhead in fiddling with GL error handling, the ability to use the constant color write message in most cases, and no GLSL clear shaders appearing in MESA_GLSL=dump output. The downside is more batch flushing and a total recompute of GL state at the end of blorp. However, if we're ever going to use the fast color clear feature of CMS surfaces, we'll need this anyway since it requires very special state setup. This increases the fail rate of some the GLES3conform ARB_sync tests, because of the initial flush at the start of blorp. The tests already intermittently failed (because it's just a bad testing procedure), and we can return it to its previous fail rate by fixing the initial flush. Improves GLB2.7 performance 0.37% +/- 0.11% (n=71/70, outlier removed). v2: Rename the key member, use the core helper for sRGB, and use BRW_MASK_* enums, fix comment and indentation (review by Paul). v3: Rewrite a comment, drop a silly temporary variable (review by Ken) Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Make a Mesa core function for sRGB render encoding handling.Eric Anholt2013-04-304-41/+36
| | | | | | | | v2: const-qualify ctx, and add a comment about the function (recommended by Brian and Kenneth). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* i965: Don't flush the batch at the end of blorp.Eric Anholt2013-04-303-18/+19
| | | | | | | | | | Improves GLB2.7 performance 0.13% +/- 0.09% (n=104/105, outliers removed). More importantly, once color glClear()s are done through blorp in the next commit, this reduces regression in GLES3 conformance tests that rely on queueing up many glClear()s and having the GPU report being still busy in an ARB_sync query after that. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Remove the last spans code!Eric Anholt2013-04-3011-148/+6
| | | | | | | | The remaining bits happen to do nothing that _swrast_span_render_start()/finish() don't do. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* intel: Move the S8 offset calc function near its remaining usage.Eric Anholt2013-04-303-58/+56
| | | | | | | It's not really span code ever since we stopped using spans for S8. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* intel: Ensure renderbuffers are current when mapping them.Eric Anholt2013-04-301-6/+1
| | | | | | | | | | | | In the case of renering to windows in X, we would render to stale buffers (or not render at all!) if you hit a MapRenderbuffer as the first thing done to your window after new buffers are ready to be collected in DRI2. I think this also covers the weird comment about irb->mt being missing sometimes. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add a clarifying comment about rowStride of compressed textures.Eric Anholt2013-04-301-1/+3
| | | | | | | I always forget how we do this for compressed textures. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove the Map field from texture images.Eric Anholt2013-04-301-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Always use MapTextureImage for mapping textures for swrast.Eric Anholt2013-04-3011-300/+64
| | | | | | | | | | | | | | | Now that everything goes through ImageSlices[], we can rely on the driver's existing texture mapping function. A big block of code goes away on Radeon that looks like it was to deal with the validate that happened at SpanRenderStart, which no longer occurs since we don't need validation for the MapTextureImage hook. v2: Rewrite comment about ImageSlices, fix duplicated swImages, touch up unmap loop. Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]>
* nouveau: Replace swrast_texture_image->Map usage with ->Buffer.Eric Anholt2013-04-301-3/+1
| | | | | | | | This code is trying to deal with providing a map in the case that AllocTexImageBuffer was called, which is hooked up to the swrast variant. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nouveau: Just use MapTextureImage instead of duplicating the logic.Eric Anholt2013-04-301-81/+18
| | | | | | | | MapTextureImage has the exact same logic, except it can also handle swrast-allocated buffers. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Make a teximage's stored RowStride be in terms of bytes per row.Eric Anholt2013-04-306-9/+30
| | | | | | | | | | | | | For hardware drivers with pitch alignment requirements, a non-power-of-two-sized texture format won't end up being an integer number of pixels per row. Also, avoids having to change our units between MapTextureImage's rowStride and swrast's RowStride. This doesn't fully convert the compressed texel fetch path, but does make sure we don't drop any bits (not that we'd expect to). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Replace use of teximage Map in 1D/2D paths with ImageSlices[0].Eric Anholt2013-04-303-8/+8
| | | | | | | This gets us ready for the Map field to die. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Replace ImageOffsets with an ImageSlices pointer.Eric Anholt2013-04-3013-185/+123
| | | | | | | | | | | | | This is a step toward allowing drivers to use their normal mapping paths, instead of requiring that all slice mappings come from an aligned offset from the first slice's map. This incidentally fixes missing slice handling in FXT1 swrast. v2: Use slice height helper function. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Reuse _swrast_free_texture_image_buffer from drivers.Eric Anholt2013-04-302-15/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Move ImageOffsets allocation to shared code.Eric Anholt2013-04-304-44/+17
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Clean up and explain the mapping process.Eric Anholt2013-04-302-10/+17
| | | | | | | v2: Move slice height calculation to a helper function (recommeded by Brian). Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]>
* swrast: Factor out texture slice counting.Eric Anholt2013-04-301-4/+12
| | | | | | | This function going to get used a lot more in upcoming patches. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeon: Remove some dead teximage mapping code.Eric Anholt2013-04-302-52/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeon: Add missing swrast field initialization.Eric Anholt2013-04-301-0/+3
| | | | | | | | This is the equivalent of intel's 80513ec8b4c812b9c6249cc5824337a5f04ab34c. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Mesa: Use mmap on Haiku for executable memory vs mallocAlexander von Gluck IV2013-04-291-1/+1
| | | | * Haiku now has DEP enabled by default.
* i965/fs: Print out the estimated cycle count in INTEL_DEBUG=wmEric Anholt2013-04-291-0/+5
| | | | | | | This could be used by shader-db for hopefully more accurate regression testing. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Allow LRPs with uniform registers.Eric Anholt2013-04-293-1/+11
| | | | | | | | | Improves GLB2.7 performance on my HSW by 0.671455% +/- 0.225037% (n=62). v2: Make is_valid_3src() a method of the fs_reg. (recommended by Ken) Reviewed-by: Matt Turner <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* intel: Be more conservative in disabling tiling to save memory.Eric Anholt2013-04-291-3/+5
| | | | | | | | Improves GLB2.7 trex performance 1.01985% +/- 0.721366% on my IVB (n=10) and by 3.38771% +/- 0.584241% (n=15) on my HSW, due to a 32x32 ARGB8888 cubemap going from untiled to tiled. Reviewed-by: Daniel Vetter <[email protected]>
* i965: Disable Z16 on contexts that don't require it.Eric Anholt2013-04-291-1/+14
| | | | | | | | | | | | | | It appears that Z16 on Intel hardware is in fact slower than Z24, so people are getting surprisingly hurt when trying to use Z16 as a performance-versus-precision tradeoff, or when they're targeting GLES2 and that's all you get. GL 3.0+ have Z16 on the list of required exact format sizes, but GLES doesn't, so choose the better-performing layout in that case. Improves GLB 2.7 trex performance at 1920x1080 by 10.7% +/- 1.1% (n=3) on my IVB system. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Report FBO incompleteness causes through GL_ARB_debug_output.Eric Anholt2013-04-291-22/+34
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Fold the one last function intel_tex_format.c into the caller.Eric Anholt2013-04-297-27/+10
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix error checking for GS UBO getters.Eric Anholt2013-04-291-2/+7
| | | | | These are supposed to be present if both things are available, but we were enabling them if either one was.
* mesa: Add a clarifying comment about EXTRA_ error checking.Eric Anholt2013-04-291-1/+7
|
* mesa: Add an extra clarifying set of braces to getter checking.Eric Anholt2013-04-291-1/+2
| | | | | | For this multi-page single statement, my thought the end was to that the next block was mis-indented, rather than that the dropped indentation actually indicated the end of the loop.
* mesa: Fix error checking for getters consisting of only API versions.Eric Anholt2013-04-291-32/+24
| | | | | | | | | In almost all of our cases, getters that are turned on for only some API variants will have an extension listed as one of the things that can enable it, and thus api_check gets set. For extra_gl30_es3 (used for NUM_EXTENSIONS, MAJOR_VERSION, MINOR_VERSION) on a GL 2.1 context, though, we would check twice, not find either one, but never actually throw the error.
* mesa: Clarify the names of error checking variables for glGet.Eric Anholt2013-04-291-22/+21
| | | | | There's no reason to actually count these things, so the integer ++ behavior was just confusing.
* i915: Add support for GL_EXT_texture_sRGB and GL_EXT_texture_sRGB_decode.Eric Anholt2013-04-293-2/+15
| | | | This brings the driver up to GL 2.1.
* i915: Always enable GL 2.0 support.Eric Anholt2013-04-292-30/+5
| | | | There's no point in shipping a non-GL2 driver today.
* i915: Correctly set the OQ counter bits.Eric Anholt2013-04-292-0/+2
| | | | | | | | | | | | While we may provide the extension, we need to tell applications that they can't actually use it: An implementation can either set QUERY_COUNTER_BITS_ARB to the value 0, or to some number greater than or equal to n. If an implementation returns 0 for QUERY_COUNTER_BITS_ARB, then the occlusion queries will always return that zero samples passed the occlusion test, and so an application should not use occlusion queries on that implementation.
* i965: Move is_math/is_tex/is_control_flow() to backend_instruction.Kenneth Graunke2013-04-296-76/+49
| | | | | | | | | | | | | | | These are entirely based on the opcode, which is available in backend_instruction. It makes sense to only implement them in one place. This changes the VS implementation of is_tex() slightly, which now accepts FS_OPCODE_TXB and SHADER_OPCODE_LOD. However, since those aren't generated in the VS anyway, it should be fine. This also makes is_control_flow() available in the VS. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* Revert "st/mesa: add a simple path to BufferData if it only discards buffer ↵José Fonseca2013-04-291-14/+0
| | | | | | | | contents" This reverts commit 5649f886f76023532538b8792605a3578cec1ed1. It causes segfaults when size is zero.