summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: support GL_RED/GL_RG in ES2 contexts when driver support existsIlia Mirkin2015-11-304-4/+11
| | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93126 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]> Cc: "11.0 11.1" <[email protected]> (cherry picked from commit 0396eaaf80c5d7955d7926c4e448f006c7682d2e)
* radeon: only suspend queries on flush if they haven't been suspended yetNicolai Hähnle2015-11-302-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Non-timer queries are suspended during blits. When the blits end, the queries are resumed, but this resume operation itself might run out of CS space and trigger a flush. When this happens, we must prevent a duplicate suspend during preflush suspend, and we must also prevent a duplicate resume when the CS flush returns back to the original resume operation. This fixes a regression that was introduced by: commit 8a125afa6e88a3eeddba8c7fdc1a75c9b99d5489 Author: Nicolai Hähnle <[email protected]> Date: Wed Nov 18 18:40:22 2015 +0100 radeon: ensure that timing/profiling queries are suspended on flush The queries_suspended_for_flush flag is redundant because suspended queries are not removed from their respective linked list. Reviewed-by: Marek Olšák <[email protected]> Reported-by: Axel Davy <[email protected]> Cc: "11.1" <[email protected]> Tested-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit 9e5e702cfb380af461062c96d974027da8d5f17a)
* targets: use the non-inline sw helpersEmil Velikov2015-11-308-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously (with the inline ones) things were embedded into the pipe-loader, which means that we cannot control/select what we want in each target. That also meant that at runtime we ended up with the empty sw_screen_create() as the GALLIUM_SOFTPIPE/LLVMPIPE were not set. v2: Cover all the targets, not just dri. Cc: "11.1" <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Edward O'Callaghan <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Oded Gabbay <[email protected]> Tested-by: Nick Sarnie <[email protected]> (cherry picked from commit 59cfb21d4670559d49a721df766073d9d288b51a) Squashed with commit targets/xvmc: use the non-inline sw helpers This was missed in commit 59cfb21d ("targets: use the non-inline sw helpers"). Fixes build failure: CXXLD libXvMCgallium.la ../../../../src/gallium/auxiliary/pipe-loader/.libs/libpipe_loader_static.a(libpipe_loader_static_la-pipe_loader_sw.o):(.data.rel.ro+0x0): undefined reference to `sw_screen_create' collect2: error: ld returned 1 exit status Makefile:756: recipe for target 'libXvMCgallium.la' failed make[3]: *** [libXvMCgallium.la] Error 1 Trivial. (cherry picked from commit 22d2dda03be32d23bc8e9f5823a4f2469737ddbe)
* target-hepers: add non inline sw helpersEmil Velikov2015-11-292-0/+83
| | | | | | | | | | | | | Feeling rather dirty copying the inline ones, yet we need the inline ones for swrast only targets like libgl-xlib, osmesa. Cc: "11.1" <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Edward O'Callaghan <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Oded Gabbay <[email protected]> Tested-by: Nick Sarnie <[email protected]> (cherry picked from commit fbc6447c3d06d85a862df67aadb68333e2ea2431)
* pipe-loader: fix off-by one errorEmil Velikov2015-11-291-1/+1
| | | | | | | | | | | | | | | | | | With earlier commit we've dropped the manual iteration over the fixed size array and prepemtively set the variable storing the size, that is to be returned. Yet we forgot to adjust the comparison, as before we were comparing the index, now we're comparing the size. Fixes: ff9cd8a67ca "pipe-loader: directly use pipe_loader_sw_probe_null() at probe time" Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93091 Reported-by: Tom Stellard <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Tom Stellard <[email protected]> Tested-by: Dieter Nützel <[email protected]> (cherry picked from commit f6235171882d18d0b4d11a3d564c6aa3b22af9d1)
* i965: Fix scalar vertex shader struct outputs.Kenneth Graunke2015-11-292-8/+34
| | | | | | | | | | | | | | | | | | | | | While we correctly set output[] for composite varyings, we set completely bogus values for output_components[], making emit_urb_writes() output zeros instead of the actual values. Unfortunately, our simple approach goes out the window, and we need to recurse into structs to get the proper value of vector_elements for each field. Together with the previous patch, this fixes rendering in an upcoming game from Feral Interactive. v2: Use pointers instead of pass-by-mutable-reference (Jason, Matt). Cc: "11.1 11.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit 3810c1561401aba336765d64d1a5a3e44eb58eb3)
* i965: Fix fragment shader struct inputs.Kenneth Graunke2015-11-293-82/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | Apparently we have literally no support for FS varying struct inputs. This is somewhat surprising, given that we've had tests for that very feature that have been passing for a long time. Normally, varying packing splits up structures for us, so we don't see them in the backend. However, with SSO, varying packing isn't around to save us, and we get actual structs that we have to handle. This patch changes fs_visitor::emit_general_interpolation() to work recursively, properly handling nested structs/arrays/and so on. (It's easier to read with diff -b, as indentation changes.) When using the vec4 VS backend, this fixes rendering in an upcoming game from Feral Interactive. (The scalar VS backend requires additional bug fixes in the next patch.) v2: Use pointers instead of pass-by-mutable-reference (Jason, Matt). Cc: "11.1 11.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit 3e9003e9cf55265ab1fb6522dc5cbb2f455ea1f9)
* radeonsi/compute: Use the compiler's COMPUTE_PGM_RSRC* register valuesTom Stellard2015-11-292-31/+7
| | | | | | | | | | The compiler has more information and is able to optimize the bits it sets in these registers. Reviewed-by: Marek Olšák <[email protected]> CC: <[email protected]> (cherry picked from commit 89851a296536b89364fe6104d13330975788f960)
* radeonsi: Rename si_shader::ls_rsrc{1,2} to si_shader::rsrc{1,2}Tom Stellard2015-11-293-6/+6
| | | | | | | In the future, these will be used by other shaders types. Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit 95e051091676584fd7bfba9d0316c3747bf17f35)
* docs: add missed i965 feature to relnotesIan Romanick2015-11-291-0/+1
| | | | | | | | | Trivial. GL_ARB_fragment_layer_viewport support was added in 8c902a58 by Ken. Signed-off-by: Ian Romanick <[email protected]> Cc: "11.1" <[email protected]> (cherry picked from commit 9b41489cb5ae7ef9157e8e6b42f3621a871c75a3)
* glsl: implement recent spec update to SSO validationTimothy Arceri2015-11-291-0/+24
| | | | | | | | | | | | | | Enables 200+ dEQP SSO tests to proceed past validation, and fixes a ES31-CTS.sepshaderobjs.PipelineApi subtest. V2: split out change that reverts a previous patch into its own commit, move variable declaration to top of function, and fix some formatting all suggested by Ian. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Cc: "11.1" <[email protected]> (cherry picked from commit 2571a768d6cacfbc7e434dfc2b6d01bdf5be21a6)
* Revert "mesa: return initial value for VALIDATE_STATUS if pipe not bound"Timothy Arceri2015-11-291-2/+1
| | | | | | | | | | | | | | | This reverts commit ba02f7a3b6a0e4314753a8e5080db61241563f9c. The commit checked whether the pipeline was currently bound instead of checking whether it had ever been bound. The previous setting of Validated during object creation makes this unnecessary. The real problem was that Validated was not properly set to false elsewhere in the code. This is fixed by a later patch. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Cc: "11.1" <[email protected]> (cherry picked from commit 3c4aa7aff2a976e94c2b6b7bf273edd617080ca3)
* radeon/uvd: uv pitch separation for stoneyBoyuan Zhang2015-11-292-1/+6
| | | | | | | | | v2: set the behaviour default for future ASICs. Signed-off-by: Boyuan Zhang <[email protected]> Reviewed-by: Leo Liu <[email protected]> Cc: [email protected] (cherry picked from commit f55f134a033a61d67c2a71bbe57f85eb3484eec1)
* texgetimage: consolidate 1D array handling code.Dave Airlie2015-11-291-15/+11
| | | | | | | | | | | | | | This should fix the getteximage-depth test that currently asserts. I was hitting problem with virgl as well in this area. This moves the 1D array handling code to a single place. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.6 11.0 11.1" <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 237bcdbab529237a120e225c63f567934a955523)
* docs: add missed freedreno features to relnotesIlia Mirkin2015-11-291-0/+5
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.1" <[email protected]> (cherry picked from commit e4c1221d367405debdb010b249c633355a3eafe9)
* freedreno/a4xx: use a factor of 32767 for snorm8 blendingIlia Mirkin2015-11-291-5/+34
| | | | | | | | | | | | | It appears that the hardware wants the integer to be scaled the same way that the hardware representation is. snorm16 uses one of the float factors, so this is only relevant for snorm8. This fixes a number of subcases of bin/fbo-blending-formats GL_EXT_texture_snorm Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 81b16350fa2e7c1b47d976be12d2313283f22e24)
* configure.ac: default to disabled dri3 when --disable-dri is setEmil Velikov2015-11-291-0/+5
| | | | | | | | | | | | | | Not too long ago, the dri3 code was living in src/glx, which in itself was guarded by HAVE_DRI_GLX. As the name suggests we didn't dive into the folder when dri was disabled, thus we missed that dri3 does not consider/honour --enable-dri. Cc: [email protected] Fixes: 6bd9ba7d074 "loader: Add dri3 helper" Cc: Pali Rohár <[email protected]> Reported-by: Pali Rohár <[email protected]> Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit b89d1b2ccf16c0bee3708560b69e99b6dbb212f0)
* loader: unconditionally add AM_CPPFLAGS to libloader_la_CPPFLAGSEmil Velikov2015-11-291-2/+2
| | | | | | | | | | | | | | It seems that due to the conditional autotools is getting confused and forgetting to add AM_CPPFLAGS when building libloader (when HAVE_DRICOMMON is not set). Cc: [email protected] Fixes: 5a79e0a8e37 "automake: loader: rework the CPPFLAGS" Reported-by: Pali Rohár <[email protected]> Tested-by: Pali Rohár <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit b9b0a1f58e41ba4027a16300393835dc8c632f50)
* pipe-loader: link against libloader regardless of libdrm presenceEmil Velikov2015-11-291-2/+2
| | | | | | | | | | | | Whether or not the loader has libdrm support is up-to it. Anyone using the loader should just include it whenever they depend on it. Cc: [email protected] Fixes: 0f39f9cb7ad "pipe-loader: add a dummy 'static' pipe-loader" Reported-by: Jon TURNEY <[email protected]> Tested-by: Jon TURNEY <[email protected]> Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit 8a6d4765880a2c9000970b2b6e584291090b1dc3)
* nv50/ir: fix (un)spilling of 3-wide resultsIlia Mirkin2015-11-291-4/+42
| | | | | | | | | | There is no 96-bit load/store operations, so we have to split it up into a 32-bit parts, with a split/merge around it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90348 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0 11.1" <[email protected]> (cherry picked from commit 4deb118d06e96731f3481daa72c201d7258bfbbb)
* nv50,nvc0: properly handle buffer storage invalidation on dsa bufferIlia Mirkin2015-11-292-15/+17
| | | | | | | | | | In case that the buffer has no bind at all, assume it can be a regular buffer. This can happen on buffers created through the ARB_dsa interfaces. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0 11.1" <[email protected]> (cherry picked from commit ad5f6b03e793b9390e3b9f3eca68bd43f9d809eb)
* nouveau: use the buffer usage to determine placement when no bindingIlia Mirkin2015-11-291-2/+6
| | | | | | | | | | | | With ARB_direct_state_access, buffers can be created without any binding hints at all. We still need to allocate these buffers to VRAM or GART, as we don't have logic down the line to place them into GPU-mappable space. Ideally we'd be able to shift these things around based on usage. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92438 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0 11.1" <[email protected]> (cherry picked from commit 079f713754a9e5d7802b655d54320bd37f24fbfa)
* vc4: Take precedence over ilo when in simulator mode.Eric Anholt2015-11-291-8/+12
| | | | | | | | | | | They're exclusive at build time, but the ilo entry is always present, so we'd try to use it and fail out. v2: Add comment in the code, from Emil. Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 1b62a4e885267c374dbbe5d5bb2c36515eee6a95)
* vc4: Just put USE_VC4_SIMULATOR in DEFINES.Eric Anholt2015-11-293-6/+3
| | | | | | | | | In the pipe-loader reworks, it was missed in one of the new directories it was used. Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit a39eac80fd491abb990b0b77dd5e4adc5b9c53e1)
* virgl: pipe_virgl_create_screen is not staticIgor Gnatenko2015-11-291-1/+1
| | | | | | | | | Cc: [email protected] Fixes: 17d3a5f8579 "target-helpers: add a non-inline drm_helper.h" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93063 Signed-off-by: Igor Gnatenko <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 05eed0eca71f8c35f315b3b0d7de30f3ff1878b4)
* freedreno/a4xx: disable blending and alphatest for integer rt0Ilia Mirkin2015-11-291-2/+13
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 22aeb0c5684cec11fd8cb4a159b10edbcfe8d6ec)
* freedreno/a4xx: fix independent blendIlia Mirkin2015-11-292-2/+3
| | | | | | | | This fixes the ext_draw_buffers2 and arb_draw_buffers_blend tests. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 4c170d9e1d5b4e3e642b0241fd1e33948e60df9b)
* freedreno/a4xx: fix 3d texture setupIlia Mirkin2015-11-293-3/+7
| | | | | | | | | | | Same fix as on a3xx - set the second (tiny) layer size bitfield to the smallest level's size so that the hw knows not to minify beyond that. This fixes texelFetch sampler3D piglits. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 740eb63aa78a48bae5248b72f023d725ed82d1b3)
* freedreno/a4xx: only align slices in non-layer_first texturesIlia Mirkin2015-11-291-2/+4
| | | | | | | | | | | | | When layer is the container, slices are tightly packed inside of each layer. We don't need any additional alignment. On a3xx, each slice contains all the layers, so having alignment makes sense. This fixes a whole slew of array-related piglits, including texelFetch and tex-miplevel-selection varieties. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit ecb0dcd34c9bb31b240a213cd17c236b224cd290)
* meta: Don't save or restore the active client textureIan Romanick2015-11-242-4/+0
| | | | | | | | | | This setting is only used by glTexCoordPointer and related glEnable calls. Since the preceeding commits removed all of those, it is not necessary to save, reset to default, or restore this state. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 47b3a0d23504de43ce2dc028e84037f7cd89bd89)
* meta: Don't save or restore the VBO bindingIan Romanick2015-11-242-7/+0
| | | | | | | | | Nothing left in meta does anything with the VBO binding, so we don't need to save or restore it. The VAO binding is still modified. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit c63f9c735dfbd572b671f739ba5df0c2ad9a388a)
* meta/TexSubImage: Don't pollute the buffer object namespaceIan Romanick2015-11-241-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 58aa56d40bfc6ba54ad9172bf219d18eeb615a80)
* meta: Don't pollute the buffer object namespace in _mesa_meta_DrawTexIan Romanick2015-11-244-38/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 76cfe2bc4436186fd585be96c4f402c1b1c79bdf)
* meta: Use internal functions for buffer object and VAO access in ↵Ian Romanick2015-11-241-12/+20
| | | | | | | | _mesa_meta_DrawTex Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit a222d4cbc3de49857aebbdf727e53c273abcc6c1)
* meta: Track VBO using gl_buffer_object instead of GL API object handle in ↵Ian Romanick2015-11-242-6/+19
| | | | | | | | _mesa_meta_DrawTex Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit b8a7369fb7e5773892d01fcb1140fe6569ee27eb)
* meta: Partially convert _mesa_meta_DrawTex to DSAIan Romanick2015-11-241-6/+6
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit d5225ee5d92f00958c54b425fe829c811149e889)
* meta: Don't pollute the buffer object namespace in ↵Ian Romanick2015-11-241-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _mesa_meta_setup_vertex_objects tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 37d11b13ce1db2ad867ff5433cb31bcd1d93c7bf)
* meta: Use internal functions for buffer object and VAO accessIan Romanick2015-11-241-33/+43
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit b1b73a42c8f245d5bf6bbed04071b2c6519b2fb4)
* meta: Use DSA functions for VBOs in _mesa_meta_setup_vertex_objectsIan Romanick2015-11-241-19/+24
| | | | | | | | | | | The fixed-function attribute paths don't get the DSA treatment because there are no DSA entry-points for fixed-function attributes. These could have been added, but this is a temporary patch intended to make later patches easier to review. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 52921f8e089abbc6871060fc50f90b62aaf1e11b)
* meta: Track VBO using gl_buffer_object instead of GL API object handleIan Romanick2015-11-245-48/+72
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 1035e00a815f0babddac0c6c43d01fd34f7e8a94)
* meta: Don't leave the VBO bound after _mesa_meta_setup_vertex_objectsIan Romanick2015-11-245-21/+38
| | | | | | | | | | Meta currently does this, but future changes will make this impossible. Explicitly do it as a step in the patch series now to catch any possible kinks. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 3b5a7d450dea9bfadf1d72338f4418c87340805b)
* i965: Use _mesa_NamedBufferSubData for users of _mesa_meta_setup_vertex_objectsIan Romanick2015-11-241-3/+3
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit ed0bd6573b6ce83471e73d009dbab5220f9e80c0)
* meta: Use _mesa_NamedBufferData and _mesa_NamedBufferSubData for users of ↵Ian Romanick2015-11-243-10/+8
| | | | | | | | _mesa_meta_setup_vertex_objects Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 7f2f3000716d994d94c53f4a0c8a211fb00a46a4)
* meta: Use DSA functions for PBO in create_texture_for_pboIan Romanick2015-11-241-19/+11
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 89a61afdd7346d6e36caccc4d6f2a2607dc4a1f6)
* i965: Don't pollute the buffer object namespace in brw_meta_fast_clearIan Romanick2015-11-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Abdiel Janulgue <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 4e6b9c11fc545cc570ea0042af93e61bfb525d34)
* i965: Use internal functions for buffer object accessIan Romanick2015-11-241-6/+18
| | | | | | | | | | | | | | | | Instead of going through the GL API implementation functions, use the lower-level functions. This means that we have to keep track of a pointer to the gl_buffer_object and the gl_vertex_array_object. This has two advantages. First, it avoids a bunch of CPU overhead in looking up objects and validing API parameters. Second, and much more importantly, it will allow us to stop calling _mesa_GenBuffers / _mesa_CreateBuffers and pollute the buffer namespace (next patch). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Abdiel Janulgue <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit e62799bd4e7b7525995e465a4bdcf6df0b0a69a0)
* i965: Use DSA functions for VBOs in brw_meta_fast_clearIan Romanick2015-11-241-6/+7
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Abdiel Janulgue <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 1c5423d3a074d50138e5ad7945024f9cf4d063ec)
* i965: Pass brw_context instead of gl_context to brw_draw_rectlistIan Romanick2015-11-241-4/+5
| | | | | | | | | | | Future patches will use the brw_context instead. Keeping this non-functional change separate should make the function changes easier to review. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Abdiel Janulgue <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit dcadd855f14b0d3dcce04a16afdfed2d7159d4a8)
* mesa: Refactor enable_vertex_array_attrib to make ↵Ian Romanick2015-11-242-9/+22
| | | | | | | | | | | | | | | _mesa_enable_vertex_array_attrib Pulls the parts of enable_vertex_array_attrib that aren't just parameter validation out into a function that can be called from other parts of Mesa (e.g., meta). _mesa_enable_vertex_array_attrib can also be used to enable fixed-function arrays. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 4a644f1caadc6b3e26b5f0ac60ac855152e38e59)
* mesa: Refactor update_array_format to make _mesa_update_array_format_publicIan Romanick2015-11-242-19/+57
| | | | | | | | | | Pulls the parts of update_array_format that aren't just parameter validation out into a function that can be called from other parts of Mesa (e.g., meta). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit a336fcd36a4743c1ea6f8549cb31b48277359717)