aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
...
* i965: Move the hiz_op enum to blorpJason Ekstrand2016-08-2913-60/+59
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Add a fast_clear_op enumJason Ekstrand2016-08-294-16/+32
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Make blorp_addres::buffer a void*Jason Ekstrand2016-08-292-4/+4
| | | | | | | The Vulkan driver doesn't use libdrm so we don't want to bake that in. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Get rid of brw_contextJason Ekstrand2016-08-296-88/+98
| | | | | | | | | | | This commit switches all of blorp from taking a brw_context to taking a blorp_context and, where useful, a void *batch. In the GL driver, we only have one active batch at a time so the brw_context *is* the batch but in Vulkan, batch will point to the anv_cmd_buffer in which we are building instructions. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Take a blorp_context in compile_nir_shaderJason Ekstrand2016-08-296-6/+11
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/meta_util: Take an isl_device in get_fast_clear_rectJason Ekstrand2016-08-293-5/+5
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Add an "exec" function pointer to blorp_contextJason Ekstrand2016-08-298-56/+50
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Remove some i965-isms from genX_blorp_exec.hJason Ekstrand2016-08-292-5/+5
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Move the guts of brw_blorp_exec into genX_blorp_exec.cJason Ekstrand2016-08-292-66/+66
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Pull the guts of blorp_exec into a driver-agnostic headerJason Ekstrand2016-08-293-1101/+1180
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp/exec: Refactor to use a new blorp_batch structJason Ekstrand2016-08-293-148/+195
| | | | | | | | | This gets rid of brw_context throughout the core of the state setup code. Instead, it is replaced with blorp_batch which contains a pointer to the blorp_context and a void* that the driver can use for its own blorp data. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Add a helper for allocating binding tables and surface statesJason Ekstrand2016-08-291-22/+42
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Use BT_INDEX enums for setting up the binding tableJason Ekstrand2016-08-291-2/+2
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Shorten binding table index enum namesJason Ekstrand2016-08-292-6/+6
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp/genX: Add a blorp_surface_reloc helperJason Ekstrand2016-08-291-17/+21
| | | | | | | | | | | Previously, we passed the buffer address (as per the latest offset from the kernel) to ISL to use when it filled out the surface state. We then called drm_intel_bo_emit_reloc() to add the relocation to the list. The newly added blorp_surface_reloc helper adds the relocation to the list and then writes the buffer address directly into the surface state. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Use blorp_address in brw_blorp_surface instead of bo+offsetJason Ekstrand2016-08-296-68/+64
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Pull emit_surface_state into genX_blorp_exec.cJason Ekstrand2016-08-293-86/+80
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Add driver mocs settings to the contextJason Ekstrand2016-08-294-18/+39
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp/genX: Move emit_urb_config into another helperJason Ekstrand2016-08-291-13/+17
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Use gen6_upload_urbJason Ekstrand2016-08-291-4/+2
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/gen6: Refactor gen6_upload_urbJason Ekstrand2016-08-292-24/+35
| | | | | | | This splits it into two functions very similar to gen7_upload_urb. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp/genX: Pull emit_3dstate_multisample into a helperJason Ekstrand2016-08-291-5/+11
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp/genX: Add helpers for allocating various bits of stateJason Ekstrand2016-08-291-32/+53
| | | | | | | | This pulls most of the brw-specific bits into helpers with generic names. Later, those will become the driver hooks for generic code. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Expose the shader cache through function pointersJason Ekstrand2016-08-294-18/+47
| | | | | | | | | | | | | | | This sanitizes blorp's access to the i965 driver's shader cache by patching it through the blorp_context. When we start using blorp in Vulkan, we will simply have to implement such a caching interface in the Vulkan driver. Note: In my first attempt at this, I simplified it down to a single upload_shader entrypoint and implemented the caching inside of blorp. This doesn't work, however, because the i965 driver will, on occation, dump its entire cache and start over. When this happens, blorp needs to be able to recompile its shaders and re-upload them. It's easiest to just expose the caching interface. Signed-off-by: Jason Ekstrand <[email protected]>
* i965/blorp: Add a blorp_context struct and init/finish funcsJason Ekstrand2016-08-296-0/+42
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/hsw: Enable ARB_ES3_1_compatibility extensionJordan Justen2016-08-291-1/+2
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* gallium: Use enum pipe_shader_type in set_shader_images()Kai Wasserbäch2016-08-291-1/+1
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Use enum pipe_shader_type in set_shader_buffers()Kai Wasserbäch2016-08-292-2/+2
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Use enum pipe_shader_type in set_sampler_views()Kai Wasserbäch2016-08-295-7/+7
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Use enum pipe_shader_type in bind_sampler_states() (v2)Kai Wasserbäch2016-08-291-1/+1
| | | | | | | | | | | v1 → v2: - Fixed indentation (noted by Brian Paul) - Removed second assert from nouveau's switch statements (suggested by Brian Paul) Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965/vec4: remove the generator hack for dual instanced GSIago Toral Quiroga2016-08-291-31/+0
| | | | | | | | | | | | | | | | | | | | | | This hack was introduced in commit 03ac2c7223f7645e3: i965/gs: Fix up gl_PointSize input swizzling for DUAL_INSTANCED gs Specifically to fixup the code we emitted to deal with gl_PointSize inputs in dual instance mode, where we were emitting a MOV to copy the point size from .w (where the hardware delivers it) to .x (because code will expect this to be a float). This meant that we were emitting a MOV to an ATTR destination that could have a width of 4 (in dual instanced mode) so it was necessary to fix the execution size and regioning of the instruction. Fortunately, Ken fixed this in 67c5d00273ca2: i965/vec4/gs: Stop munging the ATTR containing gl_PointSize. by using a WWWW swizzle instead of a MOV, and as the commit log in that patch states, we no longer emit instructions with ATTR destinations, so that makes the fixup code in the generator unnecessary. Reviewed-by: Francisco Jerez <[email protected]>
* mesa: add EXT_texture_cube_map_array supportIlia Mirkin2016-08-281-0/+1
| | | | | | | | This is identical to OES_texture_cube_map_array support. dEQP has tests which use this extension. Also it is part of AEP. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove OES_shader_io_blocks enableIlia Mirkin2016-08-284-10/+2
| | | | | | | | | | This extension should just be available whenever ES 3.1 is available. With the new extension verification infrastructure, it will only be enable-able on a #version 310 es shader, rendering the original reason for having a separate enable moot. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* main: use KHR_blend_equation_advanced enable for ES 3.2 availabilityIlia Mirkin2016-08-281-1/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* main: add missing EXTRA_END in OES_sample_variables get checkIlia Mirkin2016-08-281-0/+1
| | | | | | | Fixes: 3002296cb68 (mesa: add GL_OES_shader_multisample_interpolation support) Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: <[email protected]>
* scons: Take indirect gl_and_es_API.xml dependencies in consideration.Jose Fonseca2016-08-271-1/+1
| | | | | | Same as 26a8f76ba1a0229ee3332eaa6f1aea89d617cf3d. Trivial.
* mesa/version: OpenGL ES 3.2 depends on OES_texture_cube_map_arrayIan Romanick2016-08-261-1/+1
| | | | | | | | This has a separate enable from ARB_texture_cube_map_array. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Enable OES_texture_cube_map_array on Gen8+Ian Romanick2016-08-261-0/+1
| | | | | | | | | | | | | | | | | | These are the only platforms that current expose OES_geometry_shader. Once OpenGL ES 3.1 and OES_geometry_shader are enabled on Gen7, this extension can be enabled there as well. Gen6 will never get OpenGL ES 3.1, so it will never get this extension... even though it has the desktop OpenGL extension. Alas. NOTE: This causes a failure on Gen8+ platforms in ES3-CTS.gtf.GL3Tests.texture_storage.texture_storage_texture_targets. The test only fails because it doesn't know that 0x9009 is a valid value when the extension exists. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for OES_texture_cube_map_arrayIan Romanick2016-08-269-11/+16
| | | | | | | | | | | This has a separate enable flag because this extension also requires OES_geometry_shader. It is possible that some drivers may support OpenGL ES 3.1 and ARB_texture_cube_map but not support OES_geometry_shader. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add and use _mesa_has_texture_cube_map_array helperIan Romanick2016-08-263-8/+13
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use _mesa_has_ARB_texture_cube_map_array instead of open-coding itIan Romanick2016-08-263-4/+3
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Cosmetic changes in legal_texobj_targetIan Romanick2016-08-261-12/+12
| | | | | | | | Use bool instead of GLboolean and constify ctx. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Rearrange legal_texobj_target to look more like ↵Ian Romanick2016-08-261-11/+26
| | | | | | | | | | | _mesa_legal_get_tex_level_parameter_target This makes it a bit easier to add support for more features in different APIs. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Enable GL_OES_geometry_shader on Gen8+Ian Romanick2016-08-261-0/+1
| | | | | | | | | Gen7 can get this extension (and GL_OES_shader_io_blocks) as soon as the rest of OpenGL ES 3.1 is enabled. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Allow GL_EXT_geometry_shader and GL_EXT_geometry_point_sizeIan Romanick2016-08-262-0/+6
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Document reasons for allowing XFB drawing modes in GLES 3.1 ↵Ian Romanick2016-08-261-2/+31
| | | | | | | | | | | w/GL_OES_geometry_shader Originally this patch added the checks to allow the draw calls with XFB, but commit 2dabd497 beat me to it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove redundant _mesa_has_shader_subroutineIan Romanick2016-08-263-26/+16
| | | | | | | | | | The checks in _mesa_has_shader_subroutine are slightly different than _mesa_has_ARB_shader_subroutine, but they're not different in a way that matters. The only way to have ctx->Version >= 40 is if ctx->Extensions.ARB_shader_subroutine is set. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* nouveau: Enable EXT_texture_env_dot3 on NV10 and NV20Ian Romanick2016-08-263-1/+17
| | | | | | | | | | | | GL_DOT3_RGB_EXT and GL_DOT3_RGBA_EXT. are nearly identical to GL_DOT3_RGB and GL_DOT3_RGBA. The only difference is the _EXT versions do not apply the post-scale. Just smash logscale to 0 so that RC_OUT_SCALE_1 is always used. NOTE: I have not actually tested this. Signed-off-by: Ian Romanick <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* nouveau: Fix non-1x post-scale factor with DOT3 combinerIan Romanick2016-08-261-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes long standing bug on NV10 and NV20 where using a non-1x RGB or A post-scale with GL_DOT3_RGB or GL_DOT3_RGBA texture environment would not work. The old combiner math uses HALF_BIAS_NORMAL and HALF_BIAS_NEGATE. The GL_NV_register_combiners defines these as HALF_BIAS_NORMAL_NV max(0.0, e) - 0.5 HALF_BIAS_NEGATE_NV -max(0.0, e) + 0.5 In order to get the correct result from the dot-product, the intermediate dot-product must be multiplied by 4. This is a literal implementation of the GL_ARB_texture_env_dot3 spec. It also requires using the register combiner post-scale. As a result, the post-scale cannot be used for the post-scale set by the application. The new combiner math uses EXPAND_NORMAL and EXPAND_NEGATE. The GL_NV_register_combiners defines these as EXPAND_NORMAL_NV 2.0 * max(0.0, e) - 1.0 EXPAND_NEGATE_NV -2.0 * max(0.0, e) + 1.0 Since this fully expands the value to [-1, 1] range, the intermediate dot-product result is the desired value. This leaves the register combiner post-scale available for application use. NOTE: I have not actually tested this. Signed-off-by: Ian Romanick <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* i965: Enable OpenGLES 3.1 for HaswellJordan Justen2016-08-261-0/+5
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>