summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965: Port gen6+ multisample state emitting code to genxml.Rafael Antognolli2017-05-035-136/+96
| | | | | | | | | | | Emit 3DSTATE_MULTISAMPLE using brw_batch_emit. v3: - Remove dead code (Ken) - Simplify #if/#endif (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen4+ emit vertices code to genxml.Rafael Antognolli2017-05-034-792/+556
| | | | | | | | | | | | | | | | | | | Some code that was placed in brw_draw_upload.c and exported to be used by gen8+ was also moved to genX_state_upload, and the respective symbols are not exported anymore. v2: - Remove code from brw_draw_upload too - Emit vertices for gen4-5 too. - Use helper to setup brw_address (Kristian) - Use macros for MOCS values. - Do not use #ifndef NDEBUG on code that is actually used (Ken) v3: - Style and code clenup (Ken) - Keep some of the common code inside brw_draw_upload.c (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port push constant code to genxml.Rafael Antognolli2017-05-039-385/+226
| | | | | | | | | | | | | | | | | | | The following states are ported on this patch: - gen6_gs_push_constants - gen6_vs_push_constants - gen6_wm_push_constants - gen7_tes_push_constants v2: - Use helper to setup brw_address (Kristian) v3: - Do not use macro for upload_constant_state (Ken) - Do not re-declare MOCS macro (Ken) v4: (by Ken) - Drop more dead code, change brw->gen checks to GEN_GEN, style nits Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ 3DSTATE_SCISSOR_STATE_POINTERS to use genxml.Rafael Antognolli2017-05-034-116/+87
| | | | | | | | | | | | Emit 3DSTATE_SCISSOR_STATE_POINTERS using brw_batch_emit, and pack the scissor states using GENX(SCISSOR_RECT_pack), generated from genxml. v3: - Remove old code (Ken) - Style fixes (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen7+ 3DSTATE_TE to genxml.Rafael Antognolli2017-05-034-71/+39
| | | | | | | Emit 3DSTATE_TE on Gen7+ using brw_batch_emit helper. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ blend state code to genxml.Rafael Antognolli2017-05-035-522/+312
| | | | | | | | | | | | | | Upload blend states using GENX(BLEND_STATE_ENTRY_pack), generated from genxml. v3: - style fixes (Ken) - cleanup to remove excessive #ifdef's (Ken) - remove memset (Ken) - disable blend.AlphaToCoverageDitherEnable on gen6 (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ state emitting code to genxml.Rafael Antognolli2017-05-0313-1180/+471
| | | | | | | | | | | | | | | Ported in this patch: - 3DSTATE_DS - 3DSTATE_GS - 3DSTATE_HS - 3DSTATE_VIEWPORT_STATE_POINTERS_SF_CL v3: - Remove NEW_TRANSFORM blocks (Ken) - Bring back some comments and workaround for Ivybridge (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ 3DSTATE_VS to genxml.Rafael Antognolli2017-05-036-304/+124
| | | | | | | | | | | | | | Emit 3DSTATE_VS on Gen6+ using brw_batch_emit helper, that uses pack structs from genxml. v2: - Use render_bo helper to setup brw_address (Kristian) v3: - Bring back some comments for gen6 and remove _NEW_TRANSFORM blocks from gen7+. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen8+ 3DSTATE_PS_EXTRA to genxml.Rafael Antognolli2017-05-034-150/+88
| | | | | | | | | | | Emit 3DSTATE_PS_EXTRA on Gen8+ using brw_batch_emit helper, that uses pack structs from genxml. v3: - Style fixes and moving code around to be cleaner (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ 3DSTATE_WM to genxml.Rafael Antognolli2017-05-036-435/+185
| | | | | | | | | | | | | | | Emit 3DSTATE_WM on Gen6+ using brw_batch_emit helper, that uses pack structs from genxml. v2: - Use render_bo helper to setup brw_address (Kristian) - Remove TODO and use BRW_PSCDEPTH_OFF. v3: - A couple of style fixes (Ken) - Enable RASTRULE_UPPER_RIGHT on gen6+ instead of gen8+ (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen7+ 3DSTATE_PS to genxml.Rafael Antognolli2017-05-034-255/+134
| | | | | | | | | | | | | | | Emit 3DSTATE_PS on Gen7+ using brw_batch_emit helper, that uses pack structs from genxml. v2: - Use render_bo helper to setup brw_address (Kristian) v3: - Style fixes and code cleanup (Ken) v4: - More style fixes and code cleanup missed in v3 Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen7+ 3DSTATE_SOL to genxml.Rafael Antognolli2017-05-035-412/+338
| | | | | | | | | | | | | | | Emit 3DSTATE_SOL on Gen7+ using brw_batch_emit helper, that uses pack structs from genxml. v2: - Add helpers to assign struct brw_address (Kristian) v3: - Rename MOCS -> SOBufferMOCS - Do not re-declare MOCS macros (Ken). - Style and code reorganization (Ken). Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove calculate_attr_overrides.Rafael Antognolli2017-05-033-274/+0
| | | | | | | This function now lives inside genX_state_upload.c. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port Gen7+ 3DSTATE_SBE state to genxml.Rafael Antognolli2017-05-035-274/+116
| | | | | | | | | | | | Emit 3DSTATE_SBE on Gen7+ using brw_batch_emit helper, that uses pack structs from genxml. v2: - Use ACTIVE_COMPONENT_XYZW from gen9.xml. v3: - Style fixes (Ken) v4: #undef unconditionally (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ 3DSTATE_SF to genxml.Rafael Antognolli2017-05-035-424/+417
| | | | | | | | | | | | | Emit sf state on Gen6+ using brw_batch_emit helper, using pack structs from genxml. v3: - Reorganize code and reduce #if/#endif's (Ken) - Style fixes (Ken) - Always set AALINEDISTANCE_TRUE (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add brw_get_line_width_float.Rafael Antognolli2017-05-031-11/+14
| | | | | | | | That helper function returns the line width as a float, and is then used by brw_get_line_width to return the fixed point width. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port Gen8+ 3DSTATE_RASTER state to genxml.Rafael Antognolli2017-05-033-127/+123
| | | | | | | | | | | Emits 3DSTATE_RASTER from genX_state_upload.c using pack structs from genxml. v3: - Style fixes (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port Gen6+ 3DSTATE_CLIP state to genxml.Rafael Antognolli2017-05-033-143/+135
| | | | | | | | | | | | | | | Emit clip state on Gen6+ using brw_batch_emit helper, using pack structs from genxml. v3: - Lots style fixes (Ken) - Do not set CullTestEnableBitMask on Gen8+ (Ken) v4: - Do not include brw_defines_common.h. v5 (Ken): s/BRW_NEW_WM_PROG_DATA/BRW_NEW_FS_PROG_DATA/ Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port Gen6+ DEPTH_STENCIL state to genxml.Kenneth Graunke2017-05-035-238/+101
| | | | | | | | | | | | This emits 3DSTATE_WM_DEPTH_STENCIL on Gen8+ or DEPTH_STENCIL_STATE (and the relevant pointer packets) on Gen6-7.5 from a single function. v3: - Watch for BRW_NEW_BATCH too on gen < 8 (Ken) Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Get real per-gen atom listsKenneth Graunke2017-05-033-368/+370
| | | | | | | | Make atoms initalization compile conditionally based on the target platform. Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Rafael Antognolli <[email protected]>
* i965: Add genxml related plumbing in a new genX_state_upload.c file.Kenneth Graunke2017-05-033-5/+140
| | | | | | | | v3 (Rafael): Drop aub parameter v4 (Ken): Squash in gen4/g45 automake fixes Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Rafael Antognolli <[email protected]>
* i965: Drop "Destination Element Offset" from Ironlake SGVs.Kenneth Graunke2017-05-031-2/+4
| | | | | | | | | | | | | | The Ironlake documentation is terrible, so it's unclear whether or not this field exists there. It definitely doesn't exist on Sandybridge and later. It definitely does exist on G45. We haven't been setting it for our normal vertex attributes - just the SGVs (VertexID, InstanceID, BaseVertex, BaseInstance, DrawID). We should be consistent. My guess is that it isn't necessary and doesn't exist - this patch drops it from the SGVs elements, making them follow the behavior of most attributes. Reviewed-by: Rafael Antognolli <[email protected]>
* genxml: Fix 3DSTATE_DEPTH_BUFFER length on gen5.Rafael Antognolli2017-05-031-3/+3
| | | | | | | | The hardware docs are wrong, but the length used in the xml is also wrong. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radeonsi: constify a bunch of the perfcounter structs.Dave Airlie2017-05-043-52/+46
| | | | | | | | This moves the structs from the data segment to the rodata segment, which seems like the more correct place for them. Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/glsl_to_tgsi: remove unrequired tgsi_get_opcode_info() callTimothy Arceri2017-05-041-1/+1
| | | | | | | This is already set for the instruction at initialisation. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: make _mesa_accum() staticTimothy Arceri2017-05-042-57/+54
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: tidy up accum.hTimothy Arceri2017-05-041-2/+0
| | | | | | These were unused. Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa/varray: make use of dispatch KHR_no_error supportTimothy Arceri2017-05-046-180/+369
| | | | | | Make use of dispatch KHR_no_error support for varray functions. Reviewed-by: Nicolai Hähnle <[email protected]>
* glapi: add KHR_no_error support to dispatch table generationTimothy Arceri2017-05-042-2/+16
| | | | | | | | | | | | This will allows us to create no error versions of functions noted by a _no_error suffix. We also need to set a no_error attribute equal to "true" in the xml. V3: stop the no_error attribute being overwritten when functions alias another. V2: tidy up suggested by Nicolai. Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: Don't use FLAT_SHADE for constants.Bas Nieuwenhuizen2017-05-041-4/+4
| | | | | | | | | Setting both offset to 0x20 and flat shade results in passthrough mode instead of the constant. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Fixes: f205e19e4f8 "radv/ac: eliminate unused vertex shader outputs. (v2)"
* i965: Move MOCS macros to brw_context.h.Rafael Antognolli2017-05-032-42/+41
| | | | | | | | | | | | These macros are defined in brw_defines.h, which contains a lot of macros that conflict with autogenerated code from genxml. But we need to use them (the MOCS macros) in some of that same genxml code. Moving them to brw_context.h solves that problem and we don't have to include brw_defines.h. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv: Use BRW_BARYCENTRIC_NONPERSPECTIVE_BITS from common header.Rafael Antognolli2017-05-031-1/+2
| | | | | | | | In a previous patch some enums were split out from brw_eu_defines.h, so they could be used by genxml based code. anv can also benefit from this. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move enums to brw_compiler.h.Rafael Antognolli2017-05-032-21/+21
| | | | | | | | | | These enums live inside struct brw_wm_prog_data, so it makes sense to keep them in the same header. It also allows to use them without including brw_eu_defines.h. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Update 3DSTATE_LINE_STIPPLE xml on gen6.Rafael Antognolli2017-05-031-1/+1
| | | | | | | | From the PRM, Line Stipple Inverse Repeat Count is on dw2, bits 31:16, format U1.13. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Normalize xml for 3DSTATE_CC_STATE_POINTERS.Rafael Antognolli2017-05-034-6/+6
| | | | | | | | | - "COLOR_CALC_STATE Change" -> "Color Calc State Pointer Valid" - "Pointer to COLOR_CALC_STATE" -> "Color Calc State Pointer" - "BackFace" -> "Backface" Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Normalize xml for 3DSTATE_MULTISAMPLE.Rafael Antognolli2017-05-035-11/+8
| | | | | | | | | Name the options to "Pixel Location": - PIXLOC_CENTER -> CENTER - PIXLOC_UL_CORNER -> UL_CORNER Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Rename "Function Enable" to "Enable".Rafael Antognolli2017-05-036-16/+16
| | | | | | | | | | Rename that field name on genxml for: - 3DSTATE_GS - gen6+ - 3DSTATE_DS - gen7+ - 3DSTATE_HS - gen7+ Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Clip guardbands are float, not int.Rafael Antognolli2017-05-031-4/+4
| | | | | | | | This makes genxml create the right struct types, and generate the right batch commands. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: 3DSTATE_VS rename Function Enable to Enable.Rafael Antognolli2017-05-037-7/+7
| | | | | Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Make "Reorder Mode" fields consistent.Kenneth Graunke2017-05-033-6/+8
| | | | | | | | Both GS and SOL have these fields. Some were ReorderEnable = true, some were ReorderMode = REORDER_TRAILING, and some were just TRAILING. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* genxml: Add alias for MOCS.Rafael Antognolli2017-05-034-0/+4
| | | | | | | | | | | Use an alias, so we can set the same value as the #define's. v3: - Call it "SO Buffer MOCS" to follow the most common naming scheme. - Add alias for gen7 and gen75 too (Ken). Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Add missing field values to 3DSTATE_SBE.Rafael Antognolli2017-05-031-1/+6
| | | | | | | Fill out "Attribute Active Component Format" possible values. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Update xml for 3DSTATE_SF.Rafael Antognolli2017-05-032-6/+16
| | | | | | | | | | - Normalize "Anti-Aliasing Enable" - Add "Multisample Rasterization Mode" constants - Rename "Use Point Width on Vertex" to "Vertex" - Rename "Use Point Width from State" to "State" Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Rename clip enable property.Rafael Antognolli2017-05-034-4/+4
| | | | | | | | | | | There are two variants: - Clip Enable - CLIP Enable (on gen6) Rename everything to Clip Enable. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* genxml: Fill out Gen4, Gen45 and Gen5 XMLLouis-Francis Ratté-Boulianne2017-05-033-1065/+2517
| | | | | | | | | | | | | | Add some more details to Gen4 and Gen45 and add what is needed in Gen5 XML. This commit overwrite the previous work done on Gen4 and Gen45 as it contains more instructions and fixes some mistakes. However, comments (dword boundaries) are lost in the process. v3: - Set the type of some fields, instead of prefix. Also fix the SAMPLER_BORDER_COLOR_STATE fields of gen5.xml. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* anv: Implement VK_KHX_external_semaphore_fdJason Ekstrand2017-05-035-16/+199
| | | | | | | | This implementation allocates a 4k BO for each semaphore that can be exported using OPAQUE_FD and uses the kernel's already-existing synchronization mechanism on BOs. Reviewed-by: Chad Versace <[email protected]>
* anv: Pull the guts of cmd_buffer_execbuf into a helperJason Ekstrand2017-05-031-24/+35
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv: Implement VK_KHX_external_semaphoreJason Ekstrand2017-05-033-0/+13
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv: Implement VK_KHX_external_semaphore_capabilitiesJason Ekstrand2017-05-033-0/+18
| | | | | | | This just stubs things out. Real external semaphore support will come with VK_KHX_external_semaphore_fd. Reviewed-by: Chad Versace <[email protected]>
* anv: Add a real semaphore structJason Ekstrand2017-05-032-6/+54
| | | | | | | It's just a dummy for now, but we'll flesh it out as needed for external semaphores. Reviewed-by: Chad Versace <[email protected]>