aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
...
* i965/fs: Handle conditional discards.Kenneth Graunke2015-02-242-17/+26
| | | | | | | | | | | | | The discard condition tells us which channels we want killed. We want to invert that condition to get the channels that should survive (remain live) in f0.1. Emit a CMP to negate it. Nothing generates these today, but that will change shortly. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* Revert "i965/fs: Remove force_writemask_all assertion for execsize < 8."Matt Turner2015-02-241-0/+1
| | | | | | | | | This reverts commit 0d8f27eab7b7e8b7a16e76aabd3f6a0ab4880497. "This doesn't seem to be necessary." <- I was wrong! Tested-by: Markus Wick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/fs: Emit MOV(1) instructions with force_writemask_all.Matt Turner2015-02-241-0/+1
| | | | | | | Fixes rendering with Dolphin. Tested-by: Markus Wick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/fs: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.Matt Turner2015-02-242-0/+95
| | | | | | | total instructions in shared programs: 5695356 -> 5689775 (-0.10%) instructions in affected programs: 486231 -> 480650 (-1.15%) helped: 2604 LOST: 1
* i965/fs/nir: Optimize integer multiply by a 16-bit constant.Matt Turner2015-02-241-1/+23
| | | | | | | | | | | | Gen8+ support was just broken, since MUL now consumes 32-bits from both sources. Fixes 986 piglit tests on my BDW. total instructions in shared programs: 7753873 -> 7753522 (-0.00%) instructions in affected programs: 28164 -> 27813 (-1.25%) helped: 77 GAINED: 47 Reviewed-by: Ian Romanick <[email protected]>
* i965/fs/nir: Optimize (gl_FrontFacing ? x : y) where x and y are ±1.0.Matt Turner2015-02-242-0/+90
| | | | | | | | total instructions in shared programs: 7756214 -> 7753873 (-0.03%) instructions in affected programs: 455452 -> 453111 (-0.51%) helped: 2333 Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: remove unused/broken function st_print_shadersMarek Olšák2015-02-242-49/+0
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: remove struct qualifier from st_src_reg parameterBrian Paul2015-02-241-1/+1
| | | | It's a class. Silences MSVC warning.
* mesa: remove INV_SQRTF() macroBrian Paul2015-02-2410-22/+15
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: remove ceilf, floorf macrosBrian Paul2015-02-241-2/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove expf macroBrian Paul2015-02-241-1/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove logf macroBrian Paul2015-02-242-1/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove powf macroBrian Paul2015-02-244-2/+3
| | | | | | Use the wrapper in c99_math.h if needed. Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused exp2f, log2f, truncf wrappersBrian Paul2015-02-241-10/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused acosf, asinf, atan2f, etc. macrosBrian Paul2015-02-241-16/+0
| | | | | | | Not used anywhere. If any of these are needed, they should be added to c99_math.h Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FABSF with fabsfBrian Paul2015-02-2411-53/+48
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FLOORF with floorfBrian Paul2015-02-243-13/+11
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove unused CEILF macroBrian Paul2015-02-241-3/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace LOGF, EXPF with logf, expfBrian Paul2015-02-244-12/+8
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FREXPF, LDEXPF with frexpf, ldexpfBrian Paul2015-02-243-11/+9
| | | | | | Start getting rid of some imports.h macros. Use the c99 functions instead. Reviewed-by: Matt Turner <[email protected]>
* swrast: fix a few release build warningsBrian Paul2015-02-242-0/+2
|
* st/mesa: cleanup st_translate_geometry_programMarek Olšák2015-02-241-102/+30
| | | | | | | | | Mostly dead code or code that didn't do anything. Computing gs_num_outputs at the end was also useless. It's already set correctly. Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: inline st_free_tokensMarek Olšák2015-02-243-17/+3
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: cleanup st_geometry_program structureMarek Olšák2015-02-243-74/+36
| | | | | | | It's full of unused variables and variables only used in st_translate_geometry_program. Reviewed-by: Dave Airlie <[email protected]>
* mesa: add a missing GS support check in GetActiveUniformBlockivMarek Olšák2015-02-241-0/+2
| | | | Reviewed-by: Ian Romanick <[email protected]>
* driconf: Update Catalan translationAlex Henrie2015-02-241-18/+34
| | | | Signed-off-by: Alex Henrie <[email protected]>
* driconf: Update Spanish translationAlex Henrie2015-02-241-5/+21
| | | | Signed-off-by: Alex Henrie <[email protected]>
* mesa: Add missing error checks to GetProgramInfoLog, GetShaderInfoLog and ↵Eduardo Lima Mitev2015-02-241-6/+32
| | | | | | | | | | | GetProgramiv Fixes 3 dEQP tests: * dEQP-GLES3.functional.negative_api.state.get_program_info_log * dEQP-GLES3.functional.negative_api.state.get_shader_info_log * dEQP-GLES3.functional.negative_api.state.get_programiv Reviewed-by: Ian Romanick <[email protected]>
* i965: Fix non-AA wide line rendering with fractional line widthsIago Toral Quiroga2015-02-244-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | "(...)Let w be the width rounded to the nearest integer (...). If the line segment has endpoints given by (x0,y0) and (x1,y1) in window coordinates, the segment with endpoints (x0,y0-(w-1)/2) and (x1,y1-(w-1/2)) is rasterized, (...)" The hardware it not rounding the line width, so we should do it. Also, we should be careful not to go beyond the hardware limits for the line width after it gets rounded. Gen6-7 define a maximum line width slightly below 8.0, so we should advertise a maximum line width lower than 7.5 to make sure that 7.0 is the maximum integer line width that we can select. Since the line width granularity in these platforms is 0.125, we choose 7.375. Other platforms advertise rounded maximum line widths, so those are fine. Fixes the following 3 dEQP tests: dEQP-GLES3.functional.rasterization.primitives.lines_wide dEQP-GLES3.functional.rasterization.fbo.texture_2d.primitives.lines_wide dEQP-GLES3.functional.rasterization.fbo.rbo_singlesample.primitives.lines_wide Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix ctx->Texture.CubeMapSeamlessIago Toral Quiroga2015-02-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intel driver code, and apparently all other Mesa drivers, call _mesa_initialize_context early in the CreateContext hook. That function will end up calling _mesa_init_texture which will do: ctx->Texture.CubeMapSeamless = _mesa_is_gles3(ctx); But this won't work at this point, since _mesa_is_gles3 requires ctx->Version to be set and that will not happen until late in the CreateContext hook, when _mesa_compute_version is called. We can't just move the call to _mesa_compute_version before _mesa_initialize_context since it needs that available extensions have been computed, which again requires other things to be initialized, etc. Instead, we enable seamless cube maps since GLES2, which should work for most implementations, and expect drivers that don't support this to disable it manually as part of their context initialization setup. Fixes the following 192 dEQP tests: dEQP-GLES3.functional.texture.filtering.cube.formats.* dEQP-GLES3.functional.texture.filtering.cube.sizes.* dEQP-GLES3.functional.texture.filtering.cube.combinations.* dEQP-GLES3.functional.texture.mipmap.cube.* dEQP-GLES3.functional.texture.vertex.cube.filtering.* dEQP-GLES3.functional.texture.vertex.cube.wrap.* dEQP-GLES3.functional.shaders.texture_functions.texturelod.samplercube_fixed_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Return error if BeginQuery is called with an existing object of ↵Eduardo Lima Mitev2015-02-241-0/+16
| | | | | | | | | | | | | | | | | | | different type Section 2.14 Asynchronous Queries, page 84 of the OpenGL ES 3.0.4 spec states: "BeginQuery generates an INVALID_OPERATION error if any of the following conditions hold: [...] id is the name of an existing query object whose type does not match target; [...] Similar wording exists in the OpenGL 4.5 spec, section 4.2. QUERY OBJECTS AND ASYNCHRONOUS QUERIES, page 43. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.fragment.begin_query Reviewed-by: Ian Romanick <[email protected]>
* mesa: Return INVALID_OPERATION when querying a never bound Query objEduardo Lima Mitev2015-02-241-4/+4
| | | | | | | | | | | | | | | | | Section 2.14 Asynchronous Queries, page 84 of the OpenGL ES 3.0.4 states: "The command void GenQueries( sizei n, uint *ids ); returns n previously unused query object names in ids. These names are marked as used, for the purposes of GenQueries only, but no object is associated with them until the first time they are used by BeginQuery." This means that any attempt to use or query a Query object id before it has ever been bound by calling glBeginQuery, should be assume to be an invalid object. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.state.get_query_objectuiv Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add _mesa_is_array_texture helperIago Toral Quiroga2015-02-242-0/+25
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix error validating args for TexSubImage3DEduardo Lima Mitev2015-02-241-2/+2
| | | | | | | | | | | | | The zoffset and depth values were not being considered when calling error_check_subtexture_dimensions(). Fixes 2 dEQP tests: * dEQP-GLES3.functional.negative_api.texture.texsubimage3d_neg_offset * dEQP-GLES3.functional.negative_api.texture.texsubimage3d_invalid_offset Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: "10.4 10.5" <[email protected]>
* i965/blorp: round to nearest when converting float into integerSamuel Iglesias Gonsalvez2015-02-241-4/+7
| | | | | | | | | | | | | | | | | | | | Fixes: dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_nearest dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_linear dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_reverse_src_y_nearest dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_reverse_src_y_linear dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_reverse_dst_y_nearest dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_reverse_dst_y_linear dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_reverse_src_dst_x_nearest dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_reverse_src_dst_x_linear dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_reverse_src_dst_y_nearest dEQP-GLES3.functional.fbo.blit.rect.out_of_bounds_reverse_src_dst_y_linear No piglit regressions. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Perform program state upload outside of atom handlingCarl Worth2015-02-2310-84/+89
| | | | | | | | | | | | | | | | | | | | | | | | Across the board of the various generations, the intial few atoms in all of the atom lists are basically the same, (performing uploads for the various programs). The only difference is that prior to gen6 there's an ff_gs upload in place of the later gs upload. In this commit, instead of using the atom lists for this program state upload, we add a new function brw_upload_programs that calls into the per-stage upload functions which in turn check dirty bits and return immediately if nothing needs to be done. This commit is intended to have no functional change. The motivation is that future code, (such as the shader cache), wants to have a single function within which to perform various operations before and after program upload, (with some local variables holding state across the upload). It may be worth looking at whether some of the other functionality currently handled via atoms might also be more cleanly handled in a similar fashion. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix lower_load_payload() not to use an incorrect half for ↵Francisco Jerez2015-02-231-0/+8
| | | | | | immediates and uniforms. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Fix lower_load_payload() to take into account non-zero reg_offset.Francisco Jerez2015-02-231-2/+2
| | | | | | | | Fixes metadata guess when instructions in the program specify a destination register with non-zero reg_offset and when the payload of a LOAD_PAYLOAD spans several registers. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Remove logic to keep track of MRF metadata in lower_load_payload().Francisco Jerez2015-02-231-26/+13
| | | | | | | MRFs cannot be read from anyway so they cannot possibly be a valid source of LOAD_PAYLOAD. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Less broken handling of force_writemask_all in lower_load_payload().Francisco Jerez2015-02-231-7/+13
| | | | | | | | | | It's perfectly fine to read the second half of a register written with force_writemask_all from a first half MOV instruction or vice versa, and lower_load_payload shouldn't mark the whole MOV as belonging to the second half in that case. Replicate the same metadata to both halves of the destination when writemasking is disabled. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/vbo: Use unreachable to silence uninitialized var warning.Matt Turner2015-02-231-2/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: Move START/END_FAST_MATH macros to their only use.Matt Turner2015-02-232-79/+78
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove definition of NULL.Matt Turner2015-02-231-4/+0
| | | | | | If your stdlib.h doesn't define this you should fix your stdlib.h. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-23128-742/+731
| | | | Acked-by: Eric Anholt <[email protected]>
* mesa: Remove CHECK macro.Matt Turner2015-02-233-58/+30
| | | | | | | There's some commentary about how it's defined by other "modules", and maybe that was true in 2000 when the code was added. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove dead CAPI define.Matt Turner2015-02-231-5/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: Link test programs with gtest before pthreads.Matt Turner2015-02-231-10/+10
| | | | | Cc: "10.5" <[email protected]> Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=540962
* osmesa: add gallium include dirs to Makefile.amBrian Paul2015-02-231-0/+2
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89260 Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Adds missing error condition in _mesa_check_sample_count()Eduardo Lima Mitev2015-02-231-3/+4
| | | | | | | | | | | | This corrects a trivial error introduced in commit 19252fee46b835cb4f6b1cce18d7737d62b64a2e. That patch was merged recently and omits one condition (that 'samples' is greater than zero) in one of the error checks. That error will definitely cause regressions. Also corrects the reference to the specification above the error check, which was wrongly quoting OpenGL instead of OpenGL-ES. Reviewed-by: Martin Peres <[email protected]>
* i965/skl: Use 1 register for uniform pull constant payloadBen Widawsky2015-02-221-1/+1
| | | | | | | | | | | | | | When under dispatch_width=16 the previous code would allocate 2 registers for the payload when only one is needed. This manifested itself through bugs on SKL which needs to mess with this instruction. Ken though this might impact shader-db, but apparently it doesn't Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89118 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88999 Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Timo Aaltonen <[email protected]>