summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: don't clamp fragment color with integer colorbufferMarek Olšák2012-08-154-6/+11
|
* mesa: flush vertices in test_framebuffer_completenessMarek Olšák2012-08-151-0/+3
|
* i965: add ARB_texture_rgb10_a2ui supportJordan Justen2012-08-142-0/+2
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* meta: allow CopyTexSubImage on integer formatsJordan Justen2012-08-141-6/+10
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa ReadPixels: handle signed/unsigned integer clampingJordan Justen2012-08-141-3/+10
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa pack: handle packed integer formats with clampingJordan Justen2012-08-141-10/+619
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa unpack: call _mesa_problem when unpack function is not availableJordan Justen2012-08-141-0/+5
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa texstore: handle signed/unsigned integer clampingJordan Justen2012-08-141-20/+75
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa GetTexImage: handle signed/unsigned integer clampingJordan Justen2012-08-141-4/+12
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa pack: handle uint and int clamping properlyJordan Justen2012-08-144-14/+112
| | | | | | | | | | | Rename _mesa_pack_rgba_span_int to _mesa_pack_rgba_span_from_uints. Add _mesa_pack_rgba_span_from_ints. These separate routines allow the integer clamping to be handled properly for signed versus unsigned integers. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* intel: Fix rendering to a multisample front bufferChad Versace2012-08-141-0/+10
| | | | | | | | We need to downsample before flushing BUFFER_FAKE_FRONT_LEFT to BUFFER_FRONT_LEFT in intel_flush_front. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* intel: Clean up intel_flush_frontChad Versace2012-08-141-4/+5
| | | | | | | | Stop repeating ourselves. Replace the 4 instances of `driContext->driDrawablePriv` with `driDrawable`. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* intel: Refactor intel_downsample_for_dri2_flushChad Versace2012-08-143-30/+34
| | | | | | | | Move it from intel_screen.c to intel_context.c. Redeclare as non-static. A future commit will use it in multiple files. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* dri_util: Compare against the correct API enumsIan Romanick2012-08-141-2/+2
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Enable GL_ARB_invalidate_subdataIan Romanick2012-08-141-0/+1
| | | | | | | | v2: Add GL_ARB_invalidate_subdata to release notes at Brian's suggestion. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add skeleton implementations of glInvalidateTex{Sub,}ImageIan Romanick2012-08-143-0/+225
| | | | | | | | | | | | | These are part of GL_ARB_invalidate_subdata (but not OpenGL ES 3.0). v2: Add comment explaining why minimum dimensions are set to 1 for some texture targets. Add default case to switch statement to silence compiler warnings and detect new texture targets. Both changes suggested by Brian. Also use _mesa_is_desktop_gl as suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add skeleton implementations of glInvalidateBuffer{Sub,}DataIan Romanick2012-08-141-0/+97
| | | | | | | | | | | | | | | These are part of GL_ARB_invalidate_subdata (but not OpenGL ES 3.0). v2: Use _mesa_bufferobj_mapped instead of testing gl_buffer_object::Pointer as suggested by Brian. Also use _mesa_is_desktop_gl as suggested by Ken. v3: Add a comment by the map subrange / discard range overlap test and fix an off-by-one error noticed by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es: Pass context to _mesa_init_bufferobj_dispatchIan Romanick2012-08-143-5/+9
| | | | | | | | | | | With this change _mesa_init_bufferobj_dispatch won't set function pointers that don't exist in OpenGL ES. v2: Use _mesa_is_desktop_gl and _mesa_is_gles3 as suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add skeleton implementations of glInvalidate{Sub,}FramebufferIan Romanick2012-08-143-0/+154
| | | | | | | | | | | These are part of GL_ARB_invalidate_subdata and OpenGL ES 3.0. v2: Reject aux buffers in core context, and use _mesa_is_desktop_gl and _mesa_is_gles3. Both suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es3: Add _mesa_is_gles3 predicateIan Romanick2012-08-141-0/+10
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Implement ARB_texture_storageIan Romanick2012-08-142-0/+27
| | | | | | | | This is basically cut-and-paste from the swrast implementation, and it could probably be (slightly) more optimal. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* build: Use MKDIR_P in src/mesa/Makefile.amMatt Turner2012-08-141-2/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* build: Use AM_V_GEN in src/mesa/Makefile.amMatt Turner2012-08-141-4/+4
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* build: Fix out-of-tree generation of api_exec_es{1,2}.cMatt Turner2012-08-141-2/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* build/sources.mak: Add src/glsl/glcpp to INCLUDE_DIRSMatt Turner2012-08-141-0/+1
| | | | | | | Fixes problem where libdricore's of-out-tree build couldn't find glcpp.h. Reviewed-by: Kenneth Graunke <[email protected]>
* build/sources.mak: Remove unused GLSL_LIBSMatt Turner2012-08-141-6/+0
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Kill GL_ARB_shadow_ambient with fireIan Romanick2012-08-149-76/+16
| | | | | | | | | | No driver supports this extension, and it seems unlikely than any driver ever will. I think r300c may have supported it at one time, but that driver has already been removed. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Use GLdouble for depthMax in final unpack conversions.Kenneth Graunke2012-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | The final step of _mesa_unpack_depth_span is to take the temporary GLfloat depth values and convert them to the desired format. When converting to GL_UNSIGNED_INTEGER with depthMax > 0xffffff, we use double-precision math to avoid overflow and precision problems. Or at least that's the idea. Unfortunately GLdouble z = depthValues[i] * (GLfloat) depthMax; actually causes single-precision multiplication, since both operands are GLfloats. Casting depthMax to GLdouble causes the scaling to be done with double-precision math. Fixes a regression in oglconform's depth-stencil basic.read.ds test since c60ac7b17993d28af65b04f9bbbf3ee74c35358c, where the expected and actual values differed slightly. For example, 0xcfa7a6 vs. 0xcfa7a4. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49772 Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Fix the scaling of seconds to ms in perf debug.Eric Anholt2012-08-132-2/+2
| | | | *headdesk*
* i965: Validate API and version in brwCreateContextIan Romanick2012-08-133-5/+46
| | | | | | | v2: Use base-10 for versions like gl_context::Version. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Validate API and version in i915CreateContextIan Romanick2012-08-133-1/+40
| | | | | | | v2: Use base-10 for versions like gl_context::Version. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i830: Validate API and version before calling i830CreateContextIan Romanick2012-08-131-0/+18
| | | | Signed-off-by: Ian Romanick <[email protected]>
* intel: In the i915 driver, the chipset cannot be i965Ian Romanick2012-08-131-8/+5
| | | | | | | | In the i965 dirver, the chipset must be i965. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* dri: Pass API_OPENGL_CORE through to the driversIan Romanick2012-08-136-20/+100
| | | | | | | | | | | This forces the drivers to do at least some validation of context API and version before creating the context. In r100 and r200 drivers, this means that they don't do any post-hoc validation. v2: Actually reject compatibility profile 3.2+ contexts. Thanks Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Filter a bunch more functions based on APIIan Romanick2012-08-131-89/+116
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise extensions that are part of GL 1.5 in a core contextIan Romanick2012-08-131-3/+3
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise extensions that are part of GL 1.4 in a core contextIan Romanick2012-08-131-12/+12
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise extensions that are part of GL 1.3 in a core contextIan Romanick2012-08-131-6/+6
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise extensions that are part of GL 1.2 in a core contextIan Romanick2012-08-131-10/+10
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise deprecated extensions in a core contextIan Romanick2012-08-131-49/+49
| | | | | | | | | | | | | It may be possible to trim the list of extensions futher. These are just the obvious extensions that add functionality that the core context explicitly forbids. Apple's core-context extension list is *just* the extensions on top of the core GL version. I'm not sure we want to go that far, but removing some things that have been in core since 2.1 may be okay. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* build: Fix libdricore out-of-tree builds (v2)Christopher James Halse Rogers2012-08-131-1/+10
| | | | | | | | v2: Add both top_srcdir and top_builddir to mesa asm include dirs. These require both in-tree and build-time-generated files. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Christopher James Halse Rogers <[email protected]>
* build: fix location of generated files in src/mesa (v4)Christopher James Halse Rogers2012-08-133-17/+31
| | | | | | | | | | | | | | | Also fix include paths for the generated headers. v2: Switch to using self-explanatory BUILDDIR/SRCDIR defined from top_builddir/top_srcdir rather than the ambiguous TOP. v3: Add both top_builddir and top_srcdir to include flags for mesa asm. These rely on both in-tree and build-time-generated includes. v4: Rebased on top of 948c8f502a. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Christopher James Halse Rogers <[email protected]> Signed-off-by: Matt Turner <[email protected]>
* intel: Reserve enough space to finish occlusion queries on Gen6.Kenneth Graunke2012-08-122-1/+15
| | | | | | | | | | | | | | | | | | | After realizing that brw_finish_batch emitted some final PIPE_CONTROLs to record occlusion queries, Chris noted that we probably hadn't reserved enough space to actually emit them. Reserving a full 60 bytes seems a bit harsh, since we only need that much if occlusion queries are actually active. Plus, 28 bytes would be sufficient for Gen7, and 24 for Gen4-5. We could optimize this in the future, but it doesn't seem too critical. NOTE: This is a candidate for stable release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53311 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* intel: Move finish_batch() call before MI_BATCH_BUFFER_END and padding.Kenneth Graunke2012-08-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | On Gen4+, brw_finish_batch() calls brw_emit_query_end(), which emits some extra PIPE_CONTROLs to capture the current occlusion query data. Unfortunately, it was being called *after* _intel_batchbuffer_flush added the MI_BATCH_BUFFER_END, meaning those PIPE_CONTROLs didn't get inside the batch. Not only does this likely cause bogus occlusion query values, it can also cause crashes: with the recent change to use 64-bit depth count writes on Gen6+, we started emitting an odd-length PIPE_CONTROL, which happened after the MI_NOOP padding. This resulted in an odd-length batch buffer, which resulted in execbuf2 returning -EINVAL and the application dying with an intel_do_flush_locked failure. On older generations, finish_batch() doesn't emit any state, so this change shouldn't have any effect. Huge thanks to Chris Wilson for helping me figure this out. NOTE: This is a candidate for stable release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53311 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add perf debug for stalls during shader compiles.Eric Anholt2012-08-124-2/+45
| | | | | | | v2: fix bad comment from before I gave up and decided to just use doubles. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add performance debug for when the state cache gets nuked.Eric Anholt2012-08-121-1/+4
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add performance debug for shader recompiles.Eric Anholt2012-08-126-0/+103
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add performance debug for fast clear fallbacks.Eric Anholt2012-08-121-1/+9
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Add performance debug for some common GPU stalls.Eric Anholt2012-08-123-1/+19
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add performance debug for register spilling.Eric Anholt2012-08-122-0/+8
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>