summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* svga: update the svga3d device header filesBrian Paul2015-09-0211-1043/+2206
| | | | | | Remove some obsolete svga_dump.c code for items which no longer exist. Signed-off-by: Brian Paul <[email protected]>
* svga: add new version 10 device header filesBrian Paul2015-09-022-0/+2010
| | | | Signed-off-by: Brian Paul <[email protected]>
* winsys/svga: add new vmw_query.c[h] filesBrian Paul2015-09-023-1/+214
| | | | | | Functions for creating, destroying, getting queries, etc. Signed-off-by: Brian Paul <[email protected]>
* meta: Compute correct buffer size with SkipRows/SkipPixelsChris Wilson2015-09-021-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user is specifying a subregion of a buffer using SKIP_ROWS and SKIP_PIXELS, we must compute the buffer size carefully as the end of the last row may be much shorter than stride*image_height*depth. The current code tries to memcpy from beyond the end of the user data, for example causing: ==28136== Invalid read of size 8 ==28136== at 0x4C2D94E: memcpy@@GLIBC_2.14 (vg_replace_strmem.c:915) ==28136== by 0xB4ADFE3: brw_bo_write (brw_batch.c:1856) ==28136== by 0xB5B3531: brw_buffer_data (intel_buffer_objects.c:208) ==28136== by 0xB0F6275: _mesa_buffer_data (bufferobj.c:1600) ==28136== by 0xB0F6346: _mesa_BufferData (bufferobj.c:1631) ==28136== by 0xB37A1EE: create_texture_for_pbo (meta_tex_subimage.c:103) ==28136== by 0xB37A467: _mesa_meta_pbo_TexSubImage (meta_tex_subimage.c:176) ==28136== by 0xB5C8D61: intelTexSubImage (intel_tex_subimage.c:195) ==28136== by 0xB254AB4: _mesa_texture_sub_image (teximage.c:3654) ==28136== by 0xB254C9F: texsubimage (teximage.c:3712) ==28136== by 0xB2550E9: _mesa_TexSubImage2D (teximage.c:3853) ==28136== by 0x401CA0: UploadTexSubImage2D (teximage.c:171) ==28136== Address 0xd8bfbe0 is 0 bytes after a block of size 1,024 alloc'd ==28136== at 0x4C28C20: malloc (vg_replace_malloc.c:296) ==28136== by 0x402014: PerfDraw (teximage.c:270) ==28136== by 0x402648: Draw (glmain.c:182) ==28136== by 0x8385E63: ??? (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==28136== by 0x83896C8: fgEnumWindows (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==28136== by 0x838641C: glutMainLoopEvent (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==28136== by 0x8386C1C: glutMainLoop (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==28136== by 0x4019C1: main (glmain.c:262) ==28136== ==28136== Invalid read of size 8 ==28136== at 0x4C2D940: memcpy@@GLIBC_2.14 (vg_replace_strmem.c:915) ==28136== by 0xB4ADFE3: brw_bo_write (brw_batch.c:1856) ==28136== by 0xB5B3531: brw_buffer_data (intel_buffer_objects.c:208) ==28136== by 0xB0F6275: _mesa_buffer_data (bufferobj.c:1600) ==28136== by 0xB0F6346: _mesa_BufferData (bufferobj.c:1631) ==28136== by 0xB37A1EE: create_texture_for_pbo (meta_tex_subimage.c:103) ==28136== by 0xB37A467: _mesa_meta_pbo_TexSubImage (meta_tex_subimage.c:176) ==28136== by 0xB5C8D61: intelTexSubImage (intel_tex_subimage.c:195) ==28136== by 0xB254AB4: _mesa_texture_sub_image (teximage.c:3654) ==28136== by 0xB254C9F: texsubimage (teximage.c:3712) ==28136== by 0xB2550E9: _mesa_TexSubImage2D (teximage.c:3853) ==28136== by 0x401CA0: UploadTexSubImage2D (teximage.c:171) ==28136== Address 0xd8bfbe8 is 8 bytes after a block of size 1,024 alloc'd ==28136== at 0x4C28C20: malloc (vg_replace_malloc.c:296) ==28136== by 0x402014: PerfDraw (teximage.c:270) ==28136== by 0x402648: Draw (glmain.c:182) ==28136== by 0x8385E63: ??? (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==28136== by 0x83896C8: fgEnumWindows (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==28136== by 0x838641C: glutMainLoopEvent (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==28136== by 0x8386C1C: glutMainLoop (in /usr/lib/x86_64-linux-gnu/libglut.so.3.9.0) ==28136== by 0x4019C1: main (glmain.c:262) ==28136== Fixes regression from commit 7f396189f073d626c5f7a2c232dac92b65f5a23f Author: Jason Ekstrand <[email protected]> Date: Mon Jan 5 18:17:04 2015 -0800 meta: Add a BlitFramebuffers-based implementation of TexSubImage v2: However, the teximage we create does need to be width x full_height x 1 Signed-off-by: Chris Wilson <[email protected]> Cc: Jason Ekstrand <[email protected]> Cc: Neil Roberts <[email protected]> Reviewed-by Neil Roberts <[email protected]>
* i965/vec4: fill src_reg type using the constructor type parameterAlejandro Piñeiro2015-09-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | The src_reg constructor that received the glsl_type was using it only to build the swizzle, but not to fill this->type as dst_reg is doing. This caused some type mismatch between movs and alu operations on the NIR path, so copy propagation optimization was not applied to remove unneeded movs if negate modifier was involved. This was first detected on minus (negate+add) operations. Shader DB results (taking into account only vec4): total instructions in shared programs: 20019 -> 19934 (-0.42%) instructions in affected programs: 2918 -> 2833 (-2.91%) helped: 79 HURT: 0 GAINED: 0 LOST: 0 Reviewed-by: Matt Turner <[email protected]>
* r600g: Add doubles support for CYPRESSGlenn Kennard2015-09-021-2/+25
| | | | | | | | | This doesn't enable the support, just adds some of the code, so we don't have to keep rebasing. Signed-off-by: Glenn Kennard <[email protected]> Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: add doubles support for CAYMANDave Airlie2015-09-025-6/+421
| | | | | | | | | | | | | | | | Only a subset of AMD GPUs supported by r600g support doubles, CAYMAN and CYPRESS are probably all we'll try and support, however I don't have a CYPRESS so ignore that for now. This disables SB support for doubles, as we think we need to make the scheduler smarter to introduce delay slots. [airlied: pushing this to avoid pain of rebasing, it mostly works on cayman only so far, Glenn has some ideas about delay slot issues we need to look into. turned off by default for now] Signed-off-by: Dave Airlie <[email protected]>
* tgsi/scan: add uses_doubles to tgsi scannerDave Airlie2015-09-022-1/+5
| | | | | | | This allows drivers to work out if a shader contains any double opcodes easily. Signed-off-by: Dave Airlie <[email protected]>
* r600g: add multiple stream support for geom shadersGlenn Kennard2015-09-025-74/+171
| | | | | | | | | | | | This patch is taken from work by Glenn and myself, and I've spent some time making it all work here. This adds support for the multiple streams part of ARB_gpu_shader5 to r600g. It doesn't enable ARB_gpu_shader5 yet. Signed-off-by: Dave Airlie <[email protected]>
* r600g/sb: add support for multiple streams to SB backendDave Airlie2015-09-022-5/+15
| | | | | | | This adds a peephole and removes an assert that isn't actually valid with some of the stream emit instructions. Signed-off-by: Dave Airlie <[email protected]>
* r600g: add support for streams to the assembler.Dave Airlie2015-09-025-2/+11
| | | | | | | | This just adds support to the assembler dumper and allows stream instructions to be generated. Also fix up the stream debugging to add stream info. Signed-off-by: Dave Airlie <[email protected]>
* r600g/sb: dump sampler/resource index modes for textures.Dave Airlie2015-09-021-0/+4
| | | | | | This just aids debugging. Signed-off-by: Dave Airlie <[email protected]>
* mesa/readpixels: check strides are equal before skipping conversionDave Airlie2015-09-021-1/+2
| | | | | | | | | | | | | The CTS packed_pixels test checks that readpixels doesn't write into the space between rows, however we fail that here unless we check the format and stride match. This fixes all the core mesa problems with CTS packed_pixels tests. Cc: "11.0" <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* texcompress_s3tc/fxt1: fix stride checks (v1.1)Dave Airlie2015-09-022-5/+5
| | | | | | | | | | | | | | | | | | The fastpath currently checks the RowLength != width, but if you have a RowLength of 7, and Alignment of 4, then that shouldn't match. align the rowlength to the pack alignment before comparing. This fixes compressed cases in CTS packed_pixels_pixelstore test when SKIP_PIXELS is enabled, which causes row length to get set. v1.1: add fxt1 fix (Iago) Cc: "11.0" <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/readpixels: fix accel path for skipimages.Dave Airlie2015-09-021-2/+2
| | | | | | | | | | | | | | We don't need to use the 3d image address here as that will include SKIP_IMAGES, and we are only blitting a single 2D anyways, so just use the 2D path. This fixes some memory overruns under CTS packed_pixels.packed_pixels_pixelstore when PACK_SKIP_IMAGES is used. Cc: "11.0" <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/formats: 8-bit channel integer formats additionDave Airlie2015-09-025-0/+64
| | | | | | | | | Add enough 8-bit channel formats to handle all the different things CTS throws at us. Cc: "11.0" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/formats: add some formats from GL3.3Dave Airlie2015-09-025-0/+123
| | | | | | | | | | | | | | | | GL3.3 added GL_ARB_texture_rgb10_a2ui, which specifies a lot more things than just rgb10/a2ui. While playing with ogl conform one of the tests must attempted all valid formats for GL3.3 and hits the unreachable here. This adds the first chunk of formats that hit the assert. Cc: "11.0" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: handle SwapBytes in compressed texture get code.Dave Airlie2015-09-021-0/+7
| | | | | | | | This case just wasn't handled, so add support for it. Cc: "11.0" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: fix SwapBytes handling in numerous placesDave Airlie2015-09-026-56/+89
| | | | | | | | | | | | | | | | | | | In a number of places the SwapBytes handling didn't handle cases with GL_(UN)PACK_ALIGNMENT set and 7 byte width cases aligned to 8 bytes. This adds a common routine to swap bytes a 2D image and uses this code in: texture storage texture get readpixels swrast drawpixels. [airlied: updated with Brian's nitpicks]. Cc: "11.0" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* auxiliary/os: Don't implement os_get_option() on embedded builds.José Fonseca2015-09-011-0/+2
| | | | | | | | Let it be defined externally instead, allowing setting mechanisms other than environment variables. Reviewed-by: Zack Rusin <[email protected]> Reviewed-by: Matthew McClure <[email protected]>
* util: add a couple primitive restart helper functionsBrian Paul2015-09-013-0/+331
| | | | | | | | | | The first function translates prim restart indexes to be 0xffff or 0xffffffff. The second splits indexed primitives with restart indexes into sub- primitives without restart indexes. Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: add tgsi utility to transform a fragment shader to support aa pointCharmaine Lee2015-09-013-0/+346
| | | | | | | | | | This adds a tgsi utility tgsi_add_aa_point to transform a fragment shader to support anti-aliased wide point by computing the fragment distance from the point center. This utility assumes the geometry shader is emitting an extra generic output with point coord data. The semantic index of this generic output is passed to the tgsi_add_aa_point utility. Reviewed-by: Brian Paul <[email protected]>
* tgsi: adds tgsi utility to transform a shader to support point spriteCharmaine Lee2015-09-013-0/+622
| | | | | | | | | | This adds a tgsi utility tgsi_add_point_sprite to transform a geometry shader to emulate wide points by drawing quads. This utility adds an extra output for the original point position if the point position is to be written to a stream output buffer. It also assumes the driver will add a constant for inverse viewport scale after the user defined constants. Reviewed-by: Brian Paul <[email protected]>
* tgsi: add new tgsi_two_side.c utility codeBrian Paul2015-09-013-0/+264
| | | | | | | This could be used by any driver where the device doesn't directly support two-sided lighting. This code modifies a fragment shader to accecpt back-face colors and choose between the front/back colors depending on the triangle's front-face sign.
* util: add util_strcasecmp() wrapperBrian Paul2015-09-011-0/+3
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: add a utility to create geometry passthrough shaderCharmaine Lee2015-09-012-0/+57
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/util: fix returning empty box for rectangle intersectionRoland Scheidegger2015-09-011-1/+6
| | | | | | | | | These functions deal with inclusive coordinates, hence a 0/0/0/0 rect returned when there's no intersection doesn't actually represent an empty rectangle. Hence return 0/-1/0/-1 instead. This fixes some problems in llvmpipe with empty scissor rects (which up to now didn't really matter because while the intersect test returned the wrong result all pixels were scissored away later anyway).
* gallium/util: return FALSE for intersection if there's empty rectanglesRoland Scheidegger2015-09-011-1/+6
| | | | | | | | | | | | It isn't really obvious if intersection test should take into account empty rectangles or if the caller should do it. But it looks like most callers actually verified one of the rects but not the other, but since correctly returning an empty rect that other rect could actually be empty leading to more bugs. Hence just verify both rects for emptyness in the intersection test itself which makes the code easier in the caller (though it will be slower if the caller knows the rectangles are non-empty). Reviewed-by: Zack Rusin <[email protected]>
* tgsi: add some more helper functionsCharmaine Lee2015-09-011-4/+65
| | | | | | | | | | This patch adds some more helper functions such as . tgsi_transform_temps_decl . tgsi_transform_output_decl . tgsi_transform_dst_reg . tgsi_transform_src_reg Reviewed-by: Brian Paul <[email protected]>
* tgsi: added tgsi_is_shadow_target() helperBrian Paul2015-09-012-0/+21
|
* tgsi: add negate parameter to tgsi_transform_kill_inst()Brian Paul2015-09-014-5/+8
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* util: added ffsll() functionBrian Paul2015-09-011-0/+20
| | | | | | | v2: fix errant _GNU_SOURCE test, per Matt Turner. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* util: added util_set_index_buffer()Brian Paul2015-09-012-0/+18
| | | | | Like util_set_vertex_buffers_count(), this basically just copies a pipe_index_buffer object, taking care of refcounting.
* mesa: Move gl_vert_attrib from mtypes.h to shader_enums.hJason Ekstrand2015-09-012-107/+108
| | | | | | It is a shader enum after all... Acked-by: Brian Paul <[email protected]>
* glapi: Inline x86_64_current_tls().Matt Turner2015-09-011-8/+2
| | | | Reviewed-by: Ian Romanick <[email protected]>
* r600g: Simplify out a couple of unnecessary branchesEdward O'Callaghan2015-09-011-6/+2
| | | | Signed-off-by: Edward O'Callaghan <[email protected]>
* radeonsi: use an indirect buffer for init_configMarek Olšák2015-09-012-0/+3
| | | | | Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: add IB2 indirect buffer support for pm4 statesMarek Olšák2015-09-013-2/+54
| | | | | Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* winsys/radeon: add a flag telling how gfx IBs should be paddedMarek Olšák2015-09-013-6/+10
| | | | | | | This is always false on amdgpu (set by calloc). Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* winsys/amdgpu: remove IB padding for SIMarek Olšák2015-09-011-17/+5
| | | | | | | SI is unsupported by amdgpu Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: remove unused macro si_pm4_set_stateMarek Olšák2015-09-011-10/+0
| | | | | Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: remove si_pm4_cleanupMarek Olšák2015-09-013-10/+0
| | | | | | | All remaining pm4 state are created and destroyed by state trackers. Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: rework uploading border colorsMarek Olšák2015-09-015-92/+75
| | | | | | | | | | | | | | The border colors are uploaded only once when the state is created. This brings truly immutable sampler descriptors, because they don't have to be updated every time a sampler state is re-bound. It also moves the TA_BC_BASE_ADDR registers to init_config, removing one more state. The catch is there is now a limit: only 4096 border colors can be used by one context. I don't think that will be a problem. Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: use all built-in border colorsMarek Olšák2015-09-011-3/+18
| | | | | Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: inline si_cmd_context_controlMarek Olšák2015-09-014-41/+4
| | | | | Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: remove unused si_pm4_state codeMarek Olšák2015-09-012-28/+2
| | | | | Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: reorder si_context variablesMarek Olšák2015-09-011-40/+45
| | | | | Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: don't send IB dword usage to si_need_cs_spaceMarek Olšák2015-09-015-8/+6
| | | | | Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: don't set number of IB dwords for statesMarek Olšák2015-09-014-29/+18
| | | | | Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* radeonsi: don't count IB space for states, just use an upper boundMarek Olšák2015-09-012-55/+5
| | | | | | | | Since we don't put any resource descriptors in IBs, the space used by draw calls is quite small. Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>