summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* main: Add stubs for [Get]NamedFramebufferParameteri[v].Laura Ekstrand2015-05-143-0/+42
| | | | | | | | | | | | | | The ARB_direct_state_access specification says (as of 2015.02.05): "Interactions with OpenGL 4.3 or ARB_framebuffer_no_attachments If neither OpenGL 4.3 nor ARB_framebuffer_no_attachments are supported, ignore the support for NamedFramebufferParameteri and GetNamedFramebufferParameteriv." This commit adds stubs for these entry points. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fake entry point for glClearNamedFramebufferfi.Laura Ekstrand2015-05-143-0/+23
| | | | | | | | | | Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fake entry point for glClearNamedFramebufferfv.Laura Ekstrand2015-05-143-0/+23
| | | | | | | | | | Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fake entry point for glClearNamedFramebufferuiv.Laura Ekstrand2015-05-143-0/+23
| | | | | | | | | | Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fake entry point for glClearNamedFramebufferiv.Laura Ekstrand2015-05-143-0/+25
| | | | | | | | | | Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry points for InvalidateNamedFramebuffer[Sub]Data.Laura Ekstrand2015-05-143-0/+83
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor invalidate_framebuffer_storage.Laura Ekstrand2015-05-141-11/+27
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Complete error conditions for glInvalidate*Framebuffer.Laura Ekstrand2015-05-141-1/+19
| | | | | | | Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: "10.4 10.5" <[email protected]>
* main: _mesa_blit_framebuffer updates its arbitrary framebuffers.Laura Ekstrand2015-05-141-3/+6
| | | | | | | | | Previously, we used _mesa_update_state to update the currently bound framebuffers prior to performing a blit. Now that _mesa_blit_framebuffer uses arbitrary framebuffers, _mesa_update_state is not specific enough. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry point for BlitNamedFramebuffer.Laura Ekstrand2015-05-143-0/+58
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_update_draw_buffer_bounds.Laura Ekstrand2015-05-148-10/+11
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_get_clamp_read_color.Laura Ekstrand2015-05-143-5/+7
| | | | | | | | This wasn't neccessary for ARB_direct_state_access, but felt like a good idea for the sake of completeness. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_[update|get]_clamp_fragment_color.Laura Ekstrand2015-05-147-20/+23
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_[update|get]_clamp_vertex_color.Laura Ekstrand2015-05-143-8/+14
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_update_framebuffer.Laura Ekstrand2015-05-148-14/+13
| | | | | | | | | _mesa_update_framebuffer now operates on arbitrary read and draw framebuffers. This allows BlitNamedFramebuffer to update the state of its arbitrary read and draw framebuffers. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor glBlitFramebuffer.Laura Ekstrand2015-05-142-53/+74
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fix whitespace in blit.cLaura Ekstrand2015-05-141-18/+18
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry point GetNamedFramebufferAttachmentParameteriv.Laura Ekstrand2015-05-143-41/+94
| | | | | | | | | [Fredrik: - Update one of the error messages to reflect that the framebuffer might not be the bound framebuffer. - Whitespace fixes.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry point for CheckNamedFramebufferStatus.Laura Ekstrand2015-05-143-15/+72
| | | | | | | | [Fredrik: - Retain the debugging code in CheckFramebufferStatus. - Whitespace fixes.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fix indents in former get_texture_for_framebuffer functions.Laura Ekstrand2015-05-141-39/+39
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Major refactor of get_texture_for_framebuffer.Laura Ekstrand2015-05-142-227/+267
| | | | | | | | | | | | | | | | | | | | | This splits off the (still) rather large chunk that is get_texture_for_framebuffer into lots of smaller functions specialized to service the wide variety of unique needs of *FramebufferTexture* entry points. The result is much cleaner because, rather than having a pile of branches and confusing conditions (like the boolean layered), the uniqueness is baked into the entry points. The entry points know whether or not they are layered or use a textarget. [Fredrik: - Mention the value of <textarget> in the error message. - Rename check_zoffset to check_layer, and zoffset to layer. The zoffset parameter was renamed to layer in ARB_framebuffer_object. - Make layered a GLboolean since the value is visible to the API. - Remove EXT suffixes in refactored code. - Whitespace fixes.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry points for glNamedFramebufferTexture[Layer].Laura Ekstrand2015-05-143-0/+74
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fix indentation in get_texture_for_framebuffer.Laura Ekstrand2015-05-141-85/+85
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor get_texture_for_framebuffer.Laura Ekstrand2015-05-141-22/+21
| | | | | | | | | | | | This moves a few blocks around so that the control flow is more obvious. If the texture is 0, just return true at the beginning of the function. Likewise, if the texObj is NULL, return true at the beginning of the function as well. [Fredrik: Fix the texObj NULL check] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Split framebuffer_texture.Laura Ekstrand2015-05-142-75/+198
| | | | | | | | | | | | | | | | Split apart utility function framebuffer_texture to better prepare for implementing NamedFramebufferTexture and NamedFramebufferTextureLayer. This should also pave the way for some future cleanup work. [Fredrik: - Mention which limit was exceeded when <layer> is out of range. - Update a comment to reflect that <fb> might not be the bound framebuffer. - Make it clear that the error message in glFramebufferTexture*D refers to the <textarget> parameter. - Remove EXT suffixes.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fix an error generated by FramebufferTextureLaura Ekstrand2015-05-141-4/+13
| | | | | | | | | | | | gl*FramebufferTexture should generate GL_INVALID_VALUE when the texture doesn't exist. [Fredrik: Split this change out from the next commit] Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: "10.4 10.5" <[email protected]>
* mesa: Generate GL_INVALID_VALUE in framebuffer_texture when layer < 0Fredrik Höglund2015-05-141-0/+12
| | | | | | Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: "10.4 10.5" <[email protected]>
* main: Require that the texture exists in framebuffer_textureFredrik Höglund2015-05-141-1/+1
| | | | | | | | Generate GL_INVALID_OPERATION if the texture hasn't been created. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: "10.4 10.5" <[email protected]>
* main: Fix the indentation in framebuffer_textureLaura Ekstrand2015-05-141-1/+2
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry point for NamedFramebufferRenderbuffer.Laura Ekstrand2015-05-143-44/+98
| | | | | | | | | | | | [Fredrik: - Remove the DummyRenderbuffer checks now that they are done in _mesa_lookup_renderbuffer_err. - Fix the <renderbuffertarget> name in error messages. - Make the error message in _mesa_framebuffer_renderbuffer reflect that <fb> might not be the bound framebuffer. - Remove EXT suffixes from GL tokens.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Rename framebuffer renderbuffer software fallback.Laura Ekstrand2015-05-148-12/+14
| | | | | | | | | Rename _mesa_framebuffer_renderbuffer to _mesa_FramebufferRenderbuffer_sw in preparation for adding the ARB_direct_state_access backend function for FramebufferRenderbuffer and NamedFramebufferRenderbuffer to share. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add utility function _mesa_lookup_renderbuffer_err.Laura Ekstrand2015-05-142-0/+25
| | | | | | | [Fredrik: Generate an error for non-existent renderbuffers] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add glCreateFramebuffers.Laura Ekstrand2015-05-143-5/+41
| | | | | | | [Fredrik: Whitespace fixes] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add utility function _mesa_lookup_framebuffer_err.Laura Ekstrand2015-05-142-0/+25
| | | | | | | | [Fredrik: Generate an error for non-existent framebuffers] Reviewed-by: Fredrik Höglund <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* i965: Fix PBO cache coherency issue after _mesa_meta_pbo_GetTexSubImage().Francisco Jerez2015-05-132-2/+31
| | | | | | | | | | | | | | This problem can easily be reproduced with a number of ARB_shader_image_load_store piglit tests, which use a buffer object as PBO for a pixel transfer operation and later on bind the same buffer to the pipeline as shader image -- The problem is not exclusive to images though, and is likely to affect other kinds of buffer objects that can be bound to the 3D pipeline, including vertex, index, uniform, atomic counter buffers, etc. CC: 10.5 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/fs: set execution size to 8 with simd8 ddy instructionTapani Pälli2015-05-131-0/+1
| | | | | | | | | | | Commit dd5c825 changed the way how execution size for instructions get set. Previously it was based on destination register width, now it is set explicitly when emitting instructions. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Matt Turner <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90258
* i965/cs: drop explicit initialisers in C++ fileDave Airlie2015-05-131-4/+6
| | | | | | | | gcc 4.4.7 really doesn't like them, and they aren't standard C++, they seem to be a gcc extension. Reviewed-by: Jordan Justen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: update stencil surface if it comes from textureIlia Mirkin2015-05-121-1/+4
| | | | | | | Now that ARB_texture_stencil8 is supported, this might happen. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: translate st_api robustness flags to gl_context flagsMarek Olšák2015-05-121-0/+4
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: implement GetGraphicsResetStatusMarek Olšák2015-05-124-6/+42
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Have component() set the register stride to zero.Francisco Jerez2015-05-121-0/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix offset() for registers with zero stride.Francisco Jerez2015-05-121-2/+3
| | | | | | | stride == 0 implies that the register has one channel per vector component. Reviewed-by: Matt Turner <[email protected]>
* i965: Don't forget the force_sechalf flag in lower_load_payload().Francisco Jerez2015-05-121-0/+1
| | | | | | | Regression from commit 41868bb6824c6106a55c8442006c1e2215abf567. Fixes a bunch of ARB_shader_image_load_store tests. Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Document brw_mask_reg().Francisco Jerez2015-05-121-1/+5
| | | | Reviewed-by: Matt Turner <[email protected]>
* i965: Use predicate enable bit for conditional rendering w/o stallingNeil Roberts2015-05-129-12/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously whenever a primitive is drawn the driver would call _mesa_check_conditional_render which blocks waiting for the result of the query to determine whether to render. On Gen7+ there is a bit in the 3DPRIMITIVE command which can be used to disable the primitive based on the value of a state bit. This state bit can be set based on whether two registers have different values using the MI_PREDICATE command. We can load these two registers with the pixel count values stored in the query begin and end to implement conditional rendering without stalling. Unfortunately these two source registers were not in the whitelist of available registers in the kernel driver until v3.19. This patch uses the command parser version from intel_screen to detect whether to attempt to set the predicate data registers. The predicate enable bit is currently only used for drawing 3D primitives. For blits, clears, bitmaps, copypixels and drawpixels it still causes a stall. For most of these it would probably just work to call the new brw_check_conditional_render function instead of _mesa_check_conditional_render because they already work in terms of rendering primitives. However it's a bit trickier for blits because it can use the BLT ring or the blorp codepath. I think these operations are less useful for conditional rendering than rendering primitives so it might be best to leave it for a later patch. v2: Use the command parser version to detect whether we can write to the predicate data registers instead of trying to execute a register load command. v3: Simple rebase v4: Changes suggested by Kenneth Graunke: Split the load_64bit_register function out to a separate patch so it can be a shared public function. Avoid calling _mesa_check_conditional_render if we've already determined that there's no query object. Some styling fixes. Reviewed-by: Kenneth Graunke <[email protected]>
* i956: Add a function to load a 64-bit register from a bufferNeil Roberts2015-05-122-14/+46
| | | | | | | | | | | | Adds brw_load_register_mem64 which is similar to brw_load_register_mem except that it queues two GEN7_MI_LOAD_REGISTER_MEM commands in order to load both halves of a 64-bit register. The function is implemented by splitting the 32-bit version into an internal helper function which takes a size. This will later be used to set the 64-bit predicate source registers. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Store the command parser version number in intel_screenNeil Roberts2015-05-122-1/+14
| | | | | | | | | In order to detect whether the predicate source registers can be used in a later patch we will need to know the version number for the command parser. This patch just adds a member to intel_screen and does an ioctl to get the version. Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: make sure to create a "clean" bool when doing i2bIlia Mirkin2015-05-111-1/+1
| | | | | | | | | | | | i2b has to work for all integers, not just 1. INEG would not necessarily result with all bits set, which is something that other operations can rely on by e.g. using AND (or INEG for b2i). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Cc: [email protected]
* i965/fs: Add missing initializer in fs_visitor().Matt Turner2015-05-111-1/+1
|
* egl/swrast: Enable config extension for swrastAxel Davy2015-05-111-0/+1
| | | | | | | | Enables to use dri config for swrast, like vblank_mode. Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Axel Davy <[email protected]>