summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Rename ArrayObj to VAO and DefaultArrayObj to DefaultVAO.Kenneth Graunke2014-02-0316-199/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading through the Mesa drawing code, it's not immediately obvious to me that "ArrayObj" (gl_array_object) is the Vertex Array Object (VAO) state. The comment above the structure explains this, but readers still have to remember this and translate accordingly. Out of context, "array object" is a fairly vague. Even in context, "array" has a lot of meanings: glDrawArrays, vertex data stored in user arrays, gl_client_arrays, gl_vertex_attrib_arrays, and so on. Using the term "VAO" immediately associates these fields with the OpenGL concept, clarifying the situation and aiding programmer sanity. Completely generated by: $ find . -type f -print0 | xargs -0 sed -i \ -e 's/ArrayObj;/VAO;/g' \ -e 's/->ArrayObj/->VAO/g' \ -e 's/Array\.ArrayObj/Array.VAO/g' \ -e 's/Array\.DefaultArrayObj/Array.DefaultVAO/g' v2: Rerun command to resolve conflicts with Ian's meta patches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* meta: Silence several 'unused parameter' warnings10.1-branchpointIan Romanick2014-02-021-21/+17
| | | | | | | | | | | | | | | | | | | | | | | Silences many GCC warnings of the form: drivers/common/meta.c: In function 'cleanup_temp_texture': drivers/common/meta.c:1208:41: warning: unused parameter 'ctx' [-Wunused-parameter] drivers/common/meta.c: In function 'setup_ff_blit_framebuffer': drivers/common/meta.c:1453:46: warning: unused parameter 'ctx' [-Wunused-parameter] drivers/common/meta.c: In function 'meta_glsl_blit_cleanup': drivers/common/meta.c:1998:43: warning: unused parameter 'ctx' [-Wunused-parameter] drivers/common/meta.c: In function 'meta_glsl_clear_cleanup': drivers/common/meta.c:2287:44: warning: unused parameter 'ctx' [-Wunused-parameter] drivers/common/meta.c: In function 'setup_ff_generate_mipmap': drivers/common/meta.c:3365:45: warning: unused parameter 'ctx' [-Wunused-parameter] drivers/common/meta.c: In function 'meta_glsl_generate_mipmap_cleanup': drivers/common/meta.c:3556:54: warning: unused parameter 'ctx' [-Wunused-parameter] There are a couple other similar warnings, but they are less trivial. I want to investigate these further before axing them. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* meta: Don't use fixed-function to decompress array texturesIan Romanick2014-02-021-3/+20
| | | | | | | | | | | | Array textures can't be used with fixed-function, so don't. Instead, just drop the decompress request on the floor. This is no worse than what was done previously because generating the GL error (in _mesa_set_enable) broke everything anyway. A later patch will get GL_TEXTURE_2D_ARRAY targets working. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* meta: Use NDC in decompress_texture_imageIan Romanick2014-02-021-9/+8
| | | | | | | | There is no need to use pixel coordinates, and using NDC directly will simplify the GLSL paths. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* meta: Consistenly use non-Apple VAO functionsIan Romanick2014-02-021-4/+4
| | | | | | | | | | For these objects, meta was already using the non-Apple function to delete the objects. Everywhere else in the file uses _mesa_GenVertexArrays and _mesa_BindVertexArrays. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "9.1 9.2 10.0" <[email protected]>
* meta: Fallback to software for GetTexImage of compressed ↵Ian Romanick2014-02-021-1/+2
| | | | | | | | | | | | | GL_TEXTURE_CUBE_MAP_ARRAY The hardware decompression path isn't even close to being able to handle this. This converts the crash (assertion failure) in "EXT_texture_compression_s3tc/getteximage-targets S3TC CUBE_ARRAY" to a plain old failure. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "9.1 9.2 10.0" <[email protected]>
* meta: Release resources used by _mesa_meta_DrawPixelsIan Romanick2014-02-021-0/+19
| | | | | | | | | | _mesa_meta_DrawPixels creates a VAO and (potentially) two fragment programs, but none of them are ever released. Leaking piles of memory is generally frowned upon. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "9.1 9.2 10.0" <[email protected]>
* meta: Release resources used by decompress_texture_imageIan Romanick2014-02-021-0/+21
| | | | | | | | | | | decompress_texture_image creates an FBO, an RBO, a VBO, a VAO, and a sampler object, but none of them are ever released. Later patches will add program objects, exacerbating the problem. Leaking piles of memory is generally frowned upon. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "9.1 9.2 10.0" <[email protected]>
* mesa: Use common _mesa_tex_target_to_index in tex param codeIan Romanick2014-02-021-58/+8
| | | | | | | | TEXTURE_BUFFER_INDEX has to be specially called out because it is not allowed in any of the glTexParameter or glGetTexParameter functions. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Make target_enum_to_index available outside texobj.cIan Romanick2014-02-022-3/+6
| | | | | | | | | | The next patch will use this function in another file. v2: Rename _mesa_target_enum_to_index to _mesa_tex_target_to_index. Suggested by Brian. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: make several FBO functions staticBrian Paul2014-02-022-55/+35
| | | | | | The four functions in question weren't called from any other file. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: move glGenerateMipmap() code into new genmipmap.c fileBrian Paul2014-02-027-96/+170
| | | | | | | Mipmap generation has nothing to do with FBOs. v2: update gl_genexec.py too (not api_exec.c) Acked-by: Kenneth Graunke <[email protected]>
* mesa: move glBlitFramebuffer code into new blit.c fileBrian Paul2014-02-027-478/+555
| | | | | | | Just for better organization. v2: update gl_genexec.py too (not api_exec.c) Acked-by: Kenneth Graunke <[email protected]>
* mesa: don't signal _NEW_TEXTURE in TexSubImage() functionsBrian Paul2014-02-021-3/+9
| | | | | | | | | | | glTexSubImage(), glCopyTexSubImage() and glCompressedTexSubImage() only change the texel data, not other state like texture size or format. If a driver really needs do something special it can hook into the corresponding driver functions or Map/UnmapTextureImage(). This should avoid some needless state validation effort. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add some comments about mipmap generationBrian Paul2014-02-022-0/+9
| | | | Trivial.
* mesa: simplify comment in texstorage.cBrian Paul2014-02-021-3/+2
| | | | Trivial.
* mesa: formatting fixes, 78-column wrappings in dd.hBrian Paul2014-02-021-33/+56
| | | | Trivial.
* mesa: remove target param from ctx->Driver.TexParameter()Brian Paul2014-02-026-15/+14
| | | | | | Not really used anywhere. Reviewed-by: Kenneth Graunke <[email protected]>
* gallivm: add a few const qualifiersBrian Paul2014-02-022-4/+4
| | | | Trivial.
* translate: reindent translate_sse.cBrian Paul2014-02-021-472/+474
| | | | Trivial.
* mesa: make _mesa_get_proxy_target() staticBrian Paul2014-02-022-8/+5
| | | | | | Wasn't used in any other file. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove unused _mesa_select_tex_object() functionBrian Paul2014-02-022-27/+6
| | | | | | | The _mesa_get_current_tex_object() function is now used everywhere that _mesa_select_tex_object() was formerly used. Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: use _mesa_get_current_tex_object() in swrastSetTexBuffer2()Brian Paul2014-02-021-3/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: use _mesa_get_current_tex_object() in st_context_teximage()Brian Paul2014-02-021-2/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: use _mesa_get_current_tex_object() in GetTexLevelParameteriv()Brian Paul2014-02-021-6/+3
| | | | | | And update a related comment. Reviewed-by: Kenneth Graunke <[email protected]>
* radeon: use _mesa_get_current_tex_object() in radeonSetTexBuffer2()Brian Paul2014-02-021-4/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* r200: use _mesa_get_current_tex_object() in r200SetTexBuffer2()Brian Paul2014-02-021-4/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* build: move ARCH_LIBS definition outside of ASM definitionPaul Seidler2014-02-011-6/+6
| | | | | | | _mesa_streaming_load_memcpy is also needed even if assembling is disabled Cc: "10.0" <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* dri: Add a useful error message if someone's packages missed libudev deps.Eric Anholt2014-02-011-0/+5
| | | | Reviewed-by: Matt Turner <[email protected]>
* dri: Also support the loader with libudev.so.0.Eric Anholt2014-02-011-0/+10
| | | | | | | | | As far as I know, this should be safe. If not, we have to decide whether to have variable lookup of the functions, or just drop support for .so.0 (which is a year and a half old it looks like) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74127 Reviewed-by: Matt Turner <[email protected]>
* freedreno: better manage our WFI'sRob Clark2014-02-017-24/+36
| | | | | | | | Updates to non-banked registers, CP_LOAD_STATE, etc, need a WFI if there is potentially pending rendering. Track this better, and add fd_wfi() calls everywhere that might potentially need CP_WAIT_FOR_IDLE. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: add logicopRob Clark2014-02-013-6/+27
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: handle frag z writeRob Clark2014-02-017-25/+53
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: resync generated headersRob Clark2014-02-014-9/+39
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: fix const confusionRob Clark2014-02-012-9/+9
| | | | | | | | | | | | Gallium can leave const buffers bound above what is used by the current shader. Which can have a couple bad effects: 1) write beyond const space assigned, which can trigger HLSQ lockup 2) double emit of immed consts, first with bound const buffer vals followed by with actual immed vals. This seems to be a sort of undefined condition. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx/compiler: compiler cleanupsRob Clark2014-02-017-145/+198
| | | | | | Drop color/pos/psize_regid, plus a few compiler and IR cleanups. Signed-off-by: Rob Clark <[email protected]>
* freedreno/compiler/a3xx: remove lowered instructionsRob Clark2014-02-011-354/+0
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: add tgsi lowering passRob Clark2014-02-014-2/+1229
| | | | | | | | | | | | | | | | Currently lowers the following instructions: DST, XPD, SCS, LRP, FRC, POW, LIT, EXP, LOG, DP4, DP3, DPH, DP2 translating these into equivalent simpler TGSI instructions. This probably should be moved to util so other drivers can use it, but just adding under freedreno for now so that I can clear out a lot of the lowering code in a3xx compiler before beginning to add new compiler. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx/compiler: add CLAMPRob Clark2014-02-011-7/+24
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx/compiler: various fixesRob Clark2014-02-011-14/+34
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: ctx should hold ref to devRob Clark2014-02-017-3/+9
| | | | | | | | The ctx should hold ref to dev to avoid problems if screen is destroyed before ctx. Doesn't really fix the egl/glx issues, but at least it prevents things from getting much worse. Signed-off-by: Rob Clark <[email protected]>
* freedreno: add prims-emitted driver queryRob Clark2014-02-011-0/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* i965: Silence unused variable 'ctx' warning.Kenneth Graunke2014-01-311-1/+0
| | | | | | Somehow I missed this before pushing the Broadwell PS state upload code. Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Fix math instruction hstride assertions on Broadwell.Kenneth Graunke2014-01-311-1/+1
| | | | | | | | | | | | | | In the final revision of my gen8_generator patch, I updated the MATH instruction's assertion from (dst.hstride == 1) to check that source and destination hstride matched. Unfortunately, I didn't test this enough, and many Piglit tests fail this test. The documentation indicates that "scalar source is also supported", which we believe means <0,1,0> access mode (hstride == 0). If hstride is non-zero, then it must match the destination register. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Add (disabled) Broadwell PCI IDs.Kenneth Graunke2014-01-311-0/+20
| | | | | | | | | This puts the PCI IDs in place so it's easy to enable support. However, it doesn't actually enable support since it's very preliminary still, and a few crucial pieces (such as BLORP) are still missing. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* i965: Disable 3DSTATE_WM_HZ_OP fields.Kenneth Graunke2014-01-312-0/+10
| | | | | | | | | | | | | Eric believes this to be wrong and unnecessary, as the command is supposed to emit an implicit rectangle primitive. However, empirically the pixel pipeline is completely unreliable without it. So for now, it stays until someone comes up with a better solution. We'll need to do better than this when we implement multisampling, HiZ, or fast clears...but for now, this will do. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* i965: Update GS state for Broadwell.Kenneth Graunke2014-01-315-1/+155
| | | | | | | | | | | | | | | This is quite similar to the Gen7 code. The main changes: - 48-bit relocations - Thread count is specified as U/2-1 instead of U-1. - An extra DWord (DW9) with clip planes, URB entry output length/offsets - We need to program the "Expected Vertex Count" (VerticesIn) v2: Set the number of binding table entries so they can be prefetched (requested by Eric Anholt). v3: Add a WARN_ONCE for a missing workaround. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Update multisampling state for Broadwell.Kenneth Graunke2014-01-317-1/+135
| | | | | | | | | | | | | | | | | | | | On previous platforms, 3DSTATE_MULTISAMPLE contained the number of samples, pixel location, and the positions of each sample within a pixel for each multisampling mode (4x and 8x). It was also a non-pipelined command, presumably since changing the sample positions is fairly drastic. Broadwell improves upon this by splitting the sample positions out into a separate non-pipelined state packet, 3DSTATE_SAMPLE_PATTERN. With that removed, 3DSTATE_MULTISAMPLE becomes a pipelined state packet. Broadwell also supports 2x and 16x multisampling, in addition to the 4x and 8x supported by Gen7. This patch, however, does not implement 2x and 16x. Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Update 3DSTATE_{DEPTH,STENCIL,...}_BUFFER and such for Broadwell.Kenneth Graunke2014-01-314-1/+180
| | | | | | | | | | | | | | | | | | The amount of cut and paste from Gen7 is rather ugly, and should probably be cleaned up in the future. Even the Gen7 code is in need of some tidying though; many of the function parameters aren't used on platforms that use level/layer rather than tile offsets. Tidying both can be left to a future patch series. This at least gets things going. v2: Rebase on Paul's rename of NumLayers -> MaxNumLayers. v3: Shift QPitch by 2 when storing it in the packet. Bits 14:0 store bits 16:2 of the actual value. Fixes tests. v4: Add missing stencil buffer QPitch. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* i965: Update BLEND_STATE for Broadwell.Kenneth Graunke2014-01-314-1/+216
| | | | | | | | | | | v2: Allow logic ops on all surface types. The UNORM restriction was lifted with Haswell and I simply hadn't noticed. Also, add missing BRW_NEW_STATE_BASE_ADDRESS dirty bit. Both caught by Eric Anholt. v3: Fix swapped per-RT DWord pairs. Eliminates bizarre hacks. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>