summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vega
AgeCommit message (Collapse)AuthorFilesLines
2014-05-02st/vega: Prevent signed/unsigned comparisons.José Fonseca1-5/+5
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-02-06gallium: remove PIPE_USAGE_STATICMarek Olšák1-2/+2
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-20i915,r200,radeon,vega: Change vendor from "VMware, Inc." to "Mesa Project".José Fonseca1-1/+1
These are components which were originally developed by Tungsten Graphics, which was in turn acquired by VMware, but are de facto now being maintained by third-party contributors of the Mesa open-source community. This matches what's reported by swrast driver and a few other components. Suggested by Ian Romanick.
2014-01-17s/Tungsten Graphics/VMware/José Fonseca1-1/+1
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-12gallium: allow choosing which colorbuffers to clearMarek Olšák1-1/+1
Required for glClearBuffer, which only clears one colorbuffer attachment. Example: If the first colorbuffer is float and the second one is int: pipe->clear(pipe, PIPE_CLEAR_COLOR0, float_clear_color, ...); pipe->clear(pipe, PIPE_CLEAR_COLOR1, int_clear_color, ...); This doesn't need any driver changes yet, because all drivers just use: if (flags & PIPE_CLEAR_COLOR) .. The drivers which support GL 3.0 will have to implement it properly though.
2013-11-17st/vega: Fix broken assertChris Forbes1-1/+1
This would never fire. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-10-01st/vega: consolidate C sources list into Makefile.sourcesEmil Velikov3-63/+33
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-09-18vega: Use pipe_context::blit instead of util_blit_pixels_tex.José Fonseca2-20/+26
Only compile-tested but it seems straightforward. Reviewed-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-09-11st/dri: do not create a new context for msaa copyMaarten Lankhorst1-1/+2
Commit b77316ad7594f st/dri: always copy new DRI front and back buffers to corresponding MSAA buffers introduced creating a pipe_context for every call to validate, which is not required because the callers have a context anyway. Only exception is egl_g3d_create_pbuffer_from_client_buffer, can someone test if it still works with NULL passed as context for validate? From examining the code I believe it does, but I didn't thoroughly test it. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: 9.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2013-06-26vega: add some casts to silence MSVC warningsBrian Paul2-11/+11
2013-06-13gallium/util: make WRITES_ALL_CBUFS optional in the passthrough fragment shaderMarek Olšák1-1/+2
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-06-05mesa: remove outdated version lines in commentsRico Schüller5-5/+0
Signed-off-by: Brian Paul <brianp@vmware.com>
2013-05-04gallium: fix type of flags in pipe_context::flush()Chia-I Wu1-1/+1
It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> [olv: document the parameter now that the type is unsigned]
2013-04-23gallium: Replace gl_rasterization_rules with lower_left_origin and ↵José Fonseca1-1/+2
half_pixel_center. Squashed commit of the following: commit 04c5fa2cbb8e89d6f2fa5a75af1cca03b1f6b852 Author: José Fonseca <jfonseca@vmware.com> Date: Tue Apr 23 17:37:18 2013 +0100 gallium: s/lower_left_origin/bottom_edge_rule/ commit 4dff4f64fa83b9737def136fffd161d55e4f1722 Author: José Fonseca <jfonseca@vmware.com> Date: Tue Apr 23 17:35:04 2013 +0100 gallium: Move diagram to docs. commit 442a63012c8c3c3797f45e03f2ca20ad5f399832 Author: James Benton <jbenton@vmware.com> Date: Fri May 11 17:50:55 2012 +0100 gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center. This change is necessary to achieve correct results when using OpenGL FBOs. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-04-15build: Move src/mapi/mapi/* to src/mapi/Matt Turner3-4/+4
Tested-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-21vega: fix MSVC warning about missing return statementBrian Paul1-0/+1
2013-03-13scons: Define PACKAGE_VERSION/BUGREPORT globally.José Fonseca1-1/+0
Fixes the scons build.
2013-03-13scons: Re-add ','José Fonseca1-1/+1
2013-03-12mesa: Replace MESA_VERSION with PACKAGE_VERSION.Matt Turner3-4/+3
One fewer place to have to update. Reviewed-by: Eric Anholt <eric@anholt.net>
2013-02-26st/vega: Fix memory leak in combine_shaders.Vinson Lee1-1/+3
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21scons: Fix dependencies of generated headers.José Fonseca1-3/+3
It appears that scons implicit dependency scanners fail to chain dependencies of generated headers when these are outside the build tree. This patch ensures generated source files are _always_ put in the build tree. I'm not 100% this will fix all depency issues, but from my experiments it does seem to fix this. NOTE: For this to be effective it is necessary to clean the source tree from generated header/source files. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-15gallium/util: fix glClear with MRT by making the FS write to all cbufsMarek Olšák1-1/+2
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-13Remove hacks for static MakefilesMatt Turner1-6/+0
v2: Andreas Boll <andreas.boll.dev@gmail.com> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <andreas.boll.dev@gmail.com> - remove more obsolete hacks v4: Andreas Boll <andreas.boll.dev@gmail.com> - add a previously removed TOP variable to fix vgapi build
2013-01-10Clean up .gitignore filesMatt Turner1-1/+0
2013-01-10state_trackers/vega: Convert to automakeMatt Turner3-53/+76
2013-01-04gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2-3/+9
Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2012-12-17vega: fix for object handle leakAndreas Pokorny4-1/+8
frees the object handle when a OpenVG is destroyed. Signed-off-by: Andreas Pokorny <andreas.pokorny@elektrobit.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2012-12-12gallium: remove pipe_surface::usageMarek Olšák5-22/+9
Not really used by anybody now. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-12-10vega: remove unused variablesFabio Pedretti1-3/+1
Signed-off-by: Brian Paul <brianp@vmware.com>
2012-12-07gallium: pass the current context to the flush_front state tracker functionMarek Olšák1-1/+1
I will later use the context to resolve an MSAA front buffer. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-31gallium: add start_slot parameter to set_vertex_buffersMarek Olšák1-1/+1
This allows updating only a subrange of buffer bindings. set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that range. Binding NULL resources unbinds buffers too (both buffer and user_buffer must be NULL). The meta ops are adapted to only save, change, and restore the single slot they use. The cso_context can save and restore only one vertex buffer slot. The clients can query which one it is using cso_get_aux_vertex_buffer_slot. It's currently set to 0. (the Draw module breaks if it's set to non-zero) It should decrease the CPU overhead when using a lot of meta ops, but the drivers must be able to treat each vertex buffer slot as a separate state (only r600g does so at the moment). I can imagine this also being useful for optimizing some OpenGL use cases. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-11gallium: unify transfer functionsMarek Olšák4-25/+30
"get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <brianp@vmware.com>
2012-09-05Remove useless checks for NULL before freeingMatt Turner1-2/+1
Same as earlier commit, except for "FREE" This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + FREE (E); + E = NULL; - if (unlikely (E != NULL)) { - FREE(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + FREE ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - FREE((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + FREE (E); - if (unlikely (E != NULL)) { - FREE (E); - } @@ expression E; type T; @@ + FREE ((T) E); - if (unlikely (E != NULL)) { - FREE ((T) E); - } Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-05Remove useless checks for NULL before freeingMatt Turner1-6/+3
This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NULL)) { - free(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + free ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - free((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + free (E); - if (unlikely (E != NULL)) { - free (E); - } @@ expression E; type T; @@ + free ((T) E); - if (unlikely (E != NULL)) { - free ((T) E); - } Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-05Don't cast the return value of malloc/reallocMatt Turner3-7/+7
This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
2012-09-01vega: include u_debug.h for assert()Brian Paul1-0/+1
2012-08-03vega: fix build breakage from cso sampler/view changesBrian Paul1-17/+17
2012-05-29gallium: add st_api feature mask to prevent advertising MS visualsChristoph Bumiller1-0/+1
v2: use a define for the maximum sample count v3: also test odd sample counts (r300 supports MS3) While multisample renderbuffers are supported by mesa, MS visuals are not, so we need a way to tell dri/st not to advertise them even if the gallium driver does support multisampled surfaces. Otherwise applications selecting these non-functional visuals would run into trouble ... Reviewed-by: Brian Paul <brianp@vmware.com>
2012-05-11vega: fix 565 color unpacking bugAndreas Betz1-2/+2
NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Brian Paul <brianp@vmware.com>
2012-04-30st/vega: don't use user_buffer_createMarek Olšák2-36/+10
2012-04-30st/vega: use cso_draw_arraysMarek Olšák1-3/+3
2012-04-30gallium: change set_constant_buffer to be UBO-friendlyMarek Olšák1-2/+2
2012-04-13st/vega: silence enum cast warningsDylan Noblesmith1-4/+5
clang warns on these: stroker.c:626:19: warning: implicit conversion from enumeration type 'VGPathCommand' to different enumeration type 'VGPathSegment' [-Wconversion] No change in the underlying value. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-04-13st/vega: fix uninitialized valuesDylan Noblesmith1-2/+2
C still treats array arguments exactly like pointer arguments. By sheer coincidence, this still worked fine on 64-bit machines where 2 * sizeof(float) == sizeof(void*), but not on 32-bit. Noticed by clang: text.c:76:51: warning: sizeof on array function parameter will return size of 'const VGfloat *' (aka 'const float *') instead of 'const VGfloat [2]' [-Wsizeof-array-argument] memcpy(glyph->glyph_origin, glyphOrigin, sizeof(glyphOrigin)); NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-02-18st/vega: Remove unused variable.Vinson Lee1-4/+0
Fixes this GCC warning. mask.c: In function ‘mask_layer_fill’: mask.c:387:12: warning: variable ‘alpha_color’ set but not used [-Wunused-but-set-variable] Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-01-31vega: memset data array to zero to silence uninitialized var warningsBrian Paul1-0/+2
2012-01-10Squash-merge branch 'gallium-clip-state'Marek Olšák1-0/+1
Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <brianp@vmware.com> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <airlied@redhat.com> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <maraeo@gmail.com> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <maraeo@gmail.com> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <maraeo@gmail.com> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <maraeo@gmail.com> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <maraeo@gmail.com> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <maraeo@gmail.com> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
2011-12-23st-api: Have context_create explain why creation failedIan Romanick1-3/+11
This won't be used in the client-side libGL, but the xserver has to generate a different protocol error depending on the reason context creation failed. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Chia-I Wu <olv@lunarg.com>
2011-12-15gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák1-0/+1
Namely: - EXT_transform_feedback - ARB_transform_feedback2 - ARB_transform_feedback_instanced The old interface was not useful for OpenGL and had to be reworked. This interface was originally designed for OpenGL, but additional changes have been made in order to make st/d3d1x support easier. The most notable change is the stream-out info must be linked with a vertex or geometry shader and cannot be set independently. This is due to limitations of existing hardware (special shader instructions must be used to write into stream-out buffers), and it's also how OpenGL works (stream outputs must be specified prior to linking shaders). Other than that, each stream output buffer has a "view" into it that internally maintains the number of bytes which have been written into it. (one buffer can be bound in several different transform feedback objects in OpenGL, so we must be able to have several views around) The set_stream_output_targets function contains a parameter saying whether new data should be appended or not. Also, the view can optionally be used to provide the vertex count for draw_vbo. Note that the count is supposed to be stored in device memory and the CPU never gets to know its value. OpenGL way | Gallium way ------------------------------------ BeginTF = set_so_targets(append_bitmask = 0) PauseTF = set_so_targets(num_targets = 0) ResumeTF = set_so_targets(append_bitmask = ~0) EndTF = set_so_targets(num_targets = 0) DrawTF = use pipe_draw_info::count_from_stream_output v2: * removed the reset_stream_output_targets function * added a parameter append_bitmask to set_stream_output_targets, each bit specifies whether new data should be appended to each buffer or not. v3: * added PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME for ARB_tfb2, note that the draw-auto subset is always required (for d3d10), only the pause/resume functionality is limited if the CAP is not advertised v4: * update gallium/docs v5: * compactified struct pipe_stream_output_info, updated dump/trace
2011-12-06vega: remove unused varsFabio Pedretti1-20/+5
Signed-off-by: Brian Paul <brianp@vmware.com>