aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* i965: Always scissor on Gen4-5 instead of disabling guardband.Kenneth Graunke2017-05-292-28/+13
| | | | | | | | See commit ece0e535a44c228dd994861592deb155c14740d8. This makes Gen4-5 follow the behavior we use on Gen6+. It seems to have worked out there. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Unify Gen4-5 and Gen6 SF_VIEWPORT/CLIP_VIEWPORT code.Kenneth Graunke2017-05-293-114/+9
| | | | | | | This brings the improved guardbanding we implemented on Gen6+ back to the older Gen4-5 code. It also deletes piles of code. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Make a set_scissor_bits helper function.Kenneth Graunke2017-05-291-33/+40
| | | | | | | | Gen4-5 include a single SCISSOR_RECT in SF_VIEWPORT. Making a helper function will allow us to reuse this code for Gen4-5. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Use GENX(packet_length) rather than hardcoded dword counts.Kenneth Graunke2017-05-291-9/+12
| | | | | | This is clearer and less likely to break in the future. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Move the scissoring code up near the viewport code.Kenneth Graunke2017-05-291-86/+86
| | | | | | | | These are fairly related. Gen4-5 combine the scissor rectangle and SF_VIEWPORT. Co-locating them will allow me to avoid forward declarations of helper functions in a few patches. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Replace brw->gen and devinfo->gen with GEN_GEN.Kenneth Graunke2017-05-291-6/+4
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Rework Sandybridge 3DSTATE_VIEWPORT_STATE_POINTERS.Kenneth Graunke2017-05-291-33/+15
| | | | | | | | | | | | | On Gen7+ we emit 3DSTATE_VIEWPORT_STATE_POINTERS_{SF_CL,CC} when emitting a new viewport. This patch makes us take the same approach on Sandybridge - but because we have a combined command, we just set the appropriate "change" bits. This eliminates an atom, some dirty flagging, and some brw->*.vp_offset writes. It does mean we'll emit two 3DSTATE_VIEWPORT_STATE_POINTERS instead of one if both change, but that's probably fine. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Port CC_VIEWPORT to genxml.Kenneth Graunke2017-05-293-52/+55
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: add KHR_no_error support for glBindBufferRange()Timothy Arceri2017-05-302-37/+69
| | | | | Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: create bind_buffer_range() helperTimothy Arceri2017-05-301-3/+10
| | | | | | | This will help us add KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: convert mesa_bind_buffer_range_transform_feedback() to a validate functionTimothy Arceri2017-05-303-31/+35
| | | | | | | | This allows some tidy up and also makes it so we can add KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: create _mesa_bind_buffer_range_xfb() helperTimothy Arceri2017-05-301-0/+20
| | | | | Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: split bind_atomic_buffer() in twoTimothy Arceri2017-05-301-25/+29
| | | | | | | This will help us add KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: split bind_buffer_range_shader_storage_buffer() in twoTimothy Arceri2017-05-301-13/+23
| | | | | | | This will help us implement KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: split bind_buffer_range_uniform_buffer() in twoTimothy Arceri2017-05-301-13/+19
| | | | | | | This will help us implement KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: add KHR_no_error support for glVertexArrayVertexBuffer()Timothy Arceri2017-05-302-0/+17
| | | | | Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: add KHR_no_error support for glBindVertexBuffer()Timothy Arceri2017-05-302-3/+17
| | | | | Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: split vertex_array_vertex_buffer() in twoTimothy Arceri2017-05-301-42/+53
| | | | | | | | This will allow us to skip the error checkes when adding KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: add KHR_no_error support for glBindImageTextures()Samuel Pitoiset2017-05-292-31/+51
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBindImageTexture()Samuel Pitoiset2017-05-292-0/+20
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add bind_image_texture() helperSamuel Pitoiset2017-05-291-7/+16
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add set_image_binding() helperSamuel Pitoiset2017-05-291-36/+34
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove unused layered parameter from validate_bind_image_texture()Samuel Pitoiset2017-05-291-4/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glActiveTexture()Samuel Pitoiset2017-05-292-11/+28
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/copy_image: Use the blitter on gen5Jason Ekstrand2017-05-261-1/+1
| | | | | | | This was just an accidental typo in the refactoring. The intention was to try the blitter on gen4-5, not just gen4. Reviewed-by: Matt Turner <[email protected]>
* i965/blorp: Support copyteximage on gen4-5Jason Ekstrand2017-05-261-4/+7
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Use blorp for CopyImageSubData on gen4-5Jason Ekstrand2017-05-261-123/+17
| | | | | | | | We keep the blit path because it's probably faster when it works. However, now that we can use blorp, we can delete that nasty CPU fall-back path. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Round copy size to the nearest block in intel_miptree_copyJason Ekstrand2017-05-261-2/+2
| | | | | | | | | | | The width and height of the copy don't have to be aligned to the block size if they specify the right or bottom edges of the image. (See also the comment and asserts right above). We need to round them up when we do the division in order to get it 100% right. Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "17.0 17.1" <[email protected]>
* i965: Use BLORP for color clears on gen4-5Jason Ekstrand2017-05-261-2/+1
| | | | | | | | We don't support replicated data clears yet. Those take a bit more work and enabling replicated data clears in its own commit is probably better for bisectibility anyway. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Use blorp for color blits on gen4-5Jason Ekstrand2017-05-262-53/+30
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Add blorp support for gen4-5Jason Ekstrand2017-05-266-3/+227
| | | | | | | | | | Due to complications with things such as URB setup on gen4-5, it's easier to keep gen4 support in blorp completely internal to i965. This makes things a bit awkward because that means there's a file in i965 that includes blorp_priv.h but it's either that or have a file in blorp that includes brw_context.h. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/gen4: Expose the guts of URB recalculation as a helperJason Ekstrand2017-05-262-5/+12
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Add support for gen4-5 SF programsJason Ekstrand2017-05-261-1/+2
| | | | | | | | As part of enabling support for SF programs, we plumb the SF URB size through to emit_urb_config. For now, it's always zero but, on gen4, it may be something larger. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Move clip program compilation to the compilerJason Ekstrand2017-05-2610-2339/+22
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Move SF compilation to the compilerJason Ekstrand2017-05-267-981/+12
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/clip: Make brw_clip_prog_key::interp_mode an arrayJason Ekstrand2017-05-262-2/+6
| | | | | | | | | Having it be a pointer means that we end up caching clip programs based on a pointer to wm_prog_data rather than the actual interpolation modes. We've been caching one clip program per FS ever since 91d61fbf7cb61a44a where Timothy rewrote brw_setup_vue_interpolation(). Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/sf: make brw_sf_prog_key::interp_mode an arrayJason Ekstrand2017-05-262-2/+6
| | | | | | | | | Having it be a pointer means that we end up caching clip programs based on a pointer to wm_prog_data rather than the actual interpolation modes. We've been caching one clip program per FS ever since 91d61fbf7cb61a44a where Timothy rewrote brw_setup_vue_interpolation(). Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/genxml: Sampler state is a pointer on gen4-5Jason Ekstrand2017-05-261-1/+1
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Properly handle mt->first_levelJason Ekstrand2017-05-261-0/+3
| | | | | | | | The guts of blorp and ISL don't understand i965's partial miptrees. Instead, we need to subtract off first_level before we hand anything off to blorp. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Take first_level into account when converting to ISLJason Ekstrand2017-05-261-1/+1
| | | | | | | ISL doesn't have a concept of a partial miptree. Instead, we need to subtract off first_level. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Use blorp_copy for doing r8 stencil updates on HSWJason Ekstrand2017-05-261-15/+4
| | | | | | | | | | The blorp_copy entrypoint is designed for doing memcpy like operations which is what we need to do here while blorp_blit is for handling format conversion and scaling. Using blorp_copy is much simpler and prevents us from getting formats wrong. While we're here, we get rid of the layers_per_blit thing since stencil always uses interleaved MSAA. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Do and end-of-pipe sync on both sides of fast-clear opsJason Ekstrand2017-05-261-18/+38
| | | | | | | | | | | | | | | | We've discovered in the Vulkan driver that simply doing the end-of-pipe sync afterwards is insufficient. The specific requirement stated in the PRM is that you have to do one every time you transition between the tree modes of "clear", "render", and "resolve". This is GL, so we could track it but any attempt to do so would most likely get it wrong. For now, it's easier to just assume that every fast-clear op is an island and do the sync both before and after. This also removes the unneeded flush and stall after slow-clear operations. Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "17.0 17.1" <[email protected]>
* i965: use mmap64 for AndroidRob Herring2017-05-251-16/+3
| | | | | | | | | Simplify the handling of mmap for Android by using mmap64 instead. mmap64 may have not existed for Android when this was written, but it's been around since 2013. Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* mesa: remove unrequired double calcTimothy Arceri2017-05-251-10/+2
| | | | | | type_size() will already handle this correctly for us. Reviewed-by: Marek Olšák <[email protected]>
* mesa: remove redundant modulus operationTimothy Arceri2017-05-251-3/+2
| | | | | | | The if check above means we can only get here if size is less than 4. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Remove GL_APPLE_vertex_array_object stubsIan Romanick2017-05-233-22/+0
| | | | | | | | | | | | | | | | | | Mark the functions 'exec="skip"' in the XML instead. libGL will still have the functions, but the driver won't try to use them. I verified that this commit works with piglit's 'object-namespace-pollution glClear vertex-array' on x64 with a driver built from mesa-12.0.3 tag. In fairness, this test also works with a libGL built from 7927d03. I believe it continues to work because on non-Windows platforms we generate some extra, dummy dispatch functions that can be used when a driver requests a function unknown to libGL. This was done to provide some "forward" compatibility with drivers that need more functions. This doesn't work on Windows because the Windows calling convention is for the callee to clean up the stack. That's the theory anyway. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Enable ASTC HDR for BroxtonNanley Chery2017-05-221-0/+3
| | | | | | | | This platform passes the following GLES3 tests: ES3-CTS.functional.texture.compressed.astc.endpoint_value_hdr_cem_* Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Nanley Chery <[email protected]>
* mesa: GL_ARB_shader_subroutine is not optional in core profileIan Romanick2017-05-228-48/+3
| | | | | | | | | | | text data bss dec hex filename 7038459 235248 37280 7310987 6f8e8b 32-bit i965_dri.so before 7038227 235248 37280 7310755 6f8da3 32-bit i965_dri.so after 6681438 303400 50608 7035446 6b5a36 64-bit i965_dri.so before 6681254 303400 50608 7035262 6b597e 64-bit i965_dri.so after Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* drirc: Add allow_glsl_builtin_variable_redeclaration for Dead Island Riptide ↵Benedikt Schemmer2017-05-221-0/+4
| | | | | | | Definitive Edition Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add APPLE_vertex_array_object stubsTimothy Arceri2017-05-223-0/+22
| | | | | | | | | | | APPLE_vertex_array_object support was removed in 7927d0378fc7. However it turns out we can't remove the functions because this can cause issues when libglapi is used together with DRI drivers built prior to said commit Fixes: 7927d0378fc ("mesa: drop APPLE_vertex_array_object support") Reviewed-by: Emil Velikov <[email protected]>