summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Add QueryInternalFormat to device driver virtual tableEduardo Lima Mitev2016-03-031-0/+20
| | | | | | | | | | | | | This new function queries different driver parameters for a particular target and texture format. It is basically a driver hook to support ARB_internalformat_query2. Since ARB_internalformat_query2 introduced several new query parameters over ARB_internalformat_query, having one driver hook for each parameter is no longer feasible. So this is the generic entry-point for calls to glGetInternalFormativ and glGetInternalFormati64v. Reviewed-by: Dave Airlie <[email protected]>
* glsl/opt_array_splitting: Fix indentationIago Toral Quiroga2016-03-031-28/+26
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* glsl/opt_array_splitting: Fix crash when doing array indexing into other arraysIago Toral Quiroga2016-03-031-2/+12
| | | | | | | | | | | | | | | | | | | When we find indirect indexing into an array, the current implementation of the array spliiting optimization pass does not look further into the expression tree. However, if the variable expression involves variable indexing into other arrays, we can miss that these other arrays also have variable indexing. If that happens, the pass will crash later on after hitting an assertion put there to ensure that split arrays are in fact always indexed via constants: shader_runner: opt_array_splitting.cpp:296: void ir_array_splitting_visitor::split_deref(ir_dereference**): Assertion `constant' failed. This patch fixes the problem by letting the pass step into the variable index expression to identify these cases properly. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89607 Reviewed-by: Timothy Arceri <[email protected]>
* radeonsi: Do colorformat endian swap for PIPE_USAGE_STAGINGOded Gabbay2016-03-031-5/+1
| | | | | | | | | | | | | | | | | | There is an old if statement (dated to 2011) that prevented doing endian swap for colorformat, in case the buffer is marked as PIPE_USAGE_STAGING. This is now wrong because st_ReadPixels() reads into a destination texture that is marked with PIPE_USAGE_STAGING. Therefore, even if the texture is rendered correctly to the monitor, when reading it back we get unswapped/wrong values. This patch makes the check_rgba() function in gl-1.0-readpixsanity piglit test pass in big-endian. Signed-off-by: Oded Gabbay <[email protected]> Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: Do colorformat endian swap for PIPE_USAGE_STAGINGOded Gabbay2016-03-032-17/+2
| | | | | | | | | | | | | | | | | | | | | There is an old if statement (dated to 2011) that prevented doing endian swap for colorformat, in case the buffer is marked as PIPE_USAGE_STAGING. This is now wrong because st_ReadPixels() reads into a destination texture that is marked with PIPE_USAGE_STAGING. Therefore, even if the texture is rendered correctly to the monitor, when reading it back we get unswapped/wrong values. This patch makes the check_rgba() function in gl-1.0-readpixsanity piglit test pass in big-endian. v2: removed duplicate call to r600_colorformat_endian_swap() inside evergreen_init_color_surface_rat() Signed-off-by: Oded Gabbay <[email protected]> Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/build: add OpenSWR to buildTim Rowley2016-03-0211-0/+1040
| | | | | | | Tested on Linux (centos, ubuntu, and suse variants) Reviewed-by: Emil Velikov <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* gallium/docs - add OpenSWR documentationTim Rowley2016-03-025-0/+381
| | | | Acked-by: Jose Fonseca <[email protected]>
* gallium/target-helpers: add OpenSWR driverTim Rowley2016-03-021-1/+11
| | | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* gallium/auxilary: more __cplusplus exportsTim Rowley2016-03-025-0/+34
| | | | | | | | swr driver which is written in C++ needs access to some more gallium utility functions than are currently exposed. Reviewed-by: Roland Scheidegger <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* gallium/swr: add OpenSWR rasterizerTim Rowley2016-03-0288-0/+48234
| | | | | Acked-by: Roland Scheidegger <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* gallium/swr: add OpenSWR driverTim Rowley2016-03-0223-0/+5718
| | | | | | | | OpenSWR is a new software rasterizer for x86 processors designed for high performance and high scalablility on visualization workloads. Acked-by: Roland Scheidegger <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* glsl: replace remaining tabs in ir_builder.cppTimothy Arceri2016-03-031-6/+6
| | | | Reviewed-by: Thomas Helland <[email protected]>
* mesa: Update commentAnuj Phogat2016-03-021-1/+1
| | | | Signed-off-by: Anuj Phogat <[email protected]>
* mesa: Fix function descriptionAnuj Phogat2016-03-021-1/+1
| | | | Signed-off-by: Anuj Phogat <[email protected]>
* meta: Remove the 'allocate_storage' parameter in _mesa_meta_pbo_GetTexSubImage()Anuj Phogat2016-03-024-7/+3
| | | | | | | | Texture is already allocated before calling this meta function. So, the value of 'allocate_storage' passed to the function is always false. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Fix the pbo usage in meta for GLES{1,2} contextsAnuj Phogat2016-03-021-8/+13
| | | | | | | | | | | | | OpenGL ES 1.0 doesn't support using GL_STREAM_DRAW and both ES 1.0 and 2.0 don't support GL_STREAM_READ in glBufferData(). So, handle it correctly by calling the _mesa_meta_begin() before create_texture_for_pbo(). V2: Remove the changes related to allocate_storage. (Ian) Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* program: Clean up after condition code removal.Matt Turner2016-03-021-5/+3
|
* program: Remove variable used only in assert().Matt Turner2016-03-021-2/+1
|
* program: Drop GL_FRAGMENT_PROGRAM_NV from switch statement.Matt Turner2016-03-021-1/+0
|
* gk110/ir: fix wrong emission of NOT modifier for VOTESamuel Pitoiset2016-03-021-1/+1
| | | | | | | | Spotted by Coverity. Signed-off-by: Samuel Pitoiset <[email protected]> Reported-by: Matt Turner <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/cso: fix indentationThomas Hindoe Paaboel Andersen2016-03-021-4/+4
| | | | | | | | Only one of these were recently introduced. However, since we keep copy/pasting the same wrong indentation we should probably just fix it. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: move dereference after null checkThomas Hindoe Paaboel Andersen2016-03-021-1/+3
| | | | | | | | We should not dereference shader before we have done the null check. Reviewed-by: Erik Faye-Lund <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965/gen6/gs: Replace V-immediate with VF-immediate.Matt Turner2016-03-021-5/+5
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* gallium: fix PIPE_BIND_QUERY_BUFFER - PIPE_BIND_SCANOUT overlapMarek Olšák2016-03-021-3/+3
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* i965: set ctx->Const.MaxViewport{Width,Height} to 32kSamuel Iglesias Gonsálvez2016-03-021-0/+5
| | | | | | | | | | | | | | | From ARB_viewport_array spec: " * On GL3-capable hardware the VIEWPORT_BOUNDS_RANGE should be at least [-16384, 16383]. * On GL4-capable hardware the VIEWPORT_BOUNDS_RANGE should be at least [-32768, 32767]." This range is set using ctx->Const.MaxViewportWidth value, so just bump those constants to 32k for gen7+ which can support OpenGL 4.0. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* main: remove MAX_VIEWPORT_WIDTH and MAX_VIEWPORT_HEIGHT constantsSamuel Iglesias Gonsálvez2016-03-022-7/+2
| | | | | Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* main: call invalidate_framebuffer_storage() with driver's viewport limitsSamuel Iglesias Gonsálvez2016-03-021-2/+4
| | | | | | | Don't use hardcoded ones because the driver can set different ones. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* freedreno/ir3: enable shareable shadersRob Clark2016-03-015-8/+12
| | | | | | | Now that we are no longer using the pctx reference in the shader, drop it and turn on shareable shaders. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: pass ctx to constant-emit codeRob Clark2016-03-014-25/+21
| | | | | | | Rather than fishing it out of the shader. This removes the other big user of shader->pctx. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: add dev ptr to ir3_compilerRob Clark2016-03-016-8/+10
| | | | | | | | And use this for allocating bo's to hold the shader binary, rather than accessing the dev via ctx ptr. One step towards making shaders sharable across contexts. Signed-off-by: Rob Clark <[email protected]>
* mesa: Remove NV_fragment_program remnants from dlist.c.Matt Turner2016-03-011-14/+7
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* mesa: Remove NV_fragment_program_option enable bit.Matt Turner2016-03-012-2/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program opcode parsing.Matt Turner2016-03-012-9/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program scalar suffix parsing.Matt Turner2016-03-011-17/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program_option parsing support.Matt Turner2016-03-011-44/+5
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove NV_fragment_program Abs support.Matt Turner2016-03-0110-80/+4
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove incorrect comment about OPCODE_TXD.Matt Turner2016-03-011-1/+1
| | | | | | | | The table in prog_instruction.h is correct. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove OPCODE_TXP_NV.Matt Turner2016-03-015-30/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Clean up after previous commit.Matt Turner2016-03-011-43/+41
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove condition-code and precision support.Matt Turner2016-03-0115-544/+62
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove OPCODE_KIL_NV.Matt Turner2016-03-018-54/+6
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Remove RelAddr2 support.Matt Turner2016-03-015-41/+3
| | | | | | | | Looks like more never-used crap from the first geometry shader attempt. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* program: Mark table const.Matt Turner2016-03-011-1/+1
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* mesa: Remove EmitCondCodes.Matt Turner2016-03-015-53/+2
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* docs: Remove descriptions of long dead Emit* fields.Matt Turner2016-03-011-17/+0
| | | | | | | | Dead since commit d8a366200 in 2010. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
* glsl: Initialize gl_shader_program::EmptyUniformLocations.Matt Turner2016-03-012-1/+2
| | | | | | | | | Commit 65dfb30 added exec_list EmptyUniformLocations, but only initialized the list if ARB_explicit_uniform_location was enabled, leading to crashes if the extension was not available. Cc: "11.2" <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* i965/meta: Don't pollute the framebuffer namespaceIan Romanick2016-03-013-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Topi Pohjolainen <[email protected]>
* i965/meta: Use _mesa_bind_framebuffers instead of _mesa_BindFramebufferIan Romanick2016-03-013-8/+25
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* meta: Don't pollute the framebuffer namespaceIan Romanick2016-03-014-54/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Fixes piglit tests: - object-namespace-pollution glGetTexImage-compressed framebuffer - object-namespace-pollution glGenerateMipmap framebuffer Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Topi Pohjolainen <[email protected]>
* meta/decompress: Track framebuffer using gl_framebuffer instead of GL API ↵Ian Romanick2016-03-012-7/+12
| | | | | | | object handle Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>