summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nir/tex_instr: Rename sampler to textureJason Ekstrand2016-02-0918-95/+95
| | | | | | | | | We're about to separate the two concepts. When we do, the sampler will become optional. Doing a rename first makes the separation a bit more safe because drivers that depend on GLSL or TGSI behaviour will be fine to just use the texture index all the time. Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Add some braces around loops and ifsJason Ekstrand2016-02-091-5/+10
|
* i965: Explicitly write the "TR DS Cache Disable" bit at TCS EOT.Kenneth Graunke2016-02-093-3/+6
| | | | | | | | | | | | | | | | Bit 0 of the Patch Header is "TR DS Cache Disable". Setting that bit disables the DS Cache for tessellator-output topologies resulting in stitch-transition regions (but leaves it enabled for other cases). We probably shouldn't leave this to chance - the URB could contain garbage - which could result in the cache randomly being turned on or off. This patch makes the final EOT write 0 to the first DWord (which only contains this one bit). This ensures the cache is always on. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* freedreno/ir3: use const_index helpersRob Clark2016-02-091-3/+7
| | | | Signed-off-by: Rob Clark <[email protected]>
* nir: use const_index helpersRob Clark2016-02-0911-24/+23
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* ptn: use const_index helpersRob Clark2016-02-091-2/+2
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* ttn: use const_index helpersRob Clark2016-02-091-5/+5
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* ttn: small logic cleanupRob Clark2016-02-091-1/+1
| | | | | | | The only case where dim!=NULL is where op==load_ubo. But using op==load_ubo is less confusing. Signed-off-by: Rob Clark <[email protected]>
* gtn: use const_index helpersRob Clark2016-02-091-8/+9
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: const_index helpersRob Clark2016-02-094-100/+191
| | | | | | | | | | | | | | Direct access to intr->const_index[n], where different slots have different meanings, is somewhat confusing. Instead, let's put some extra info in nir_intrinsic_infos[] about which slots map to what, and add some get/set helpers. The helpers validate that the field being accessed (base/writemask/etc) is applicable for the intrinsic opc, for some extra safety. And nir_print can use this to dump out decoded const_index fields. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: Disallow transform feedback varyings with compute shaders.Kenneth Graunke2016-02-091-2/+3
| | | | | | | | | | | | | | If the only stage is MESA_SHADER_COMPUTE, we should complain that there's nothing coming out of the geometry shader stage just as we would if the first stage were MESA_SHADER_FRAGMENT. Also, it's valid for tessellation shaders to be the stage producing transform feedback varyings, so mention those in the compiler error. Found by inspection. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radeonsi: enable denorms for 64-bit and 16-bit floatsMarek Olšák2016-02-093-6/+29
| | | | | | | This fixes FP16 conversion instructions for VI, which has 16-bit floats, but not SI & CI, which can't disable denorms for those instructions. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: pass the robust buffer access context flag to driversMarek Olšák2016-02-092-1/+11
| | | | | | radeonsi will not do bounds checking for loads if this is not set. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add a function for adding llvm function attributesMarek Olšák2016-02-092-4/+10
| | | | | | This will be used for setting the new InitialPSInputAddr attribute. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: compile geometry shaders immediatelyMarek Olšák2016-02-091-1/+2
| | | | | | they have only 1 variant Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: split out code for deleting si_shaderMarek Olšák2016-02-091-29/+36
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: move code writing tess factors into a separate functionMarek Olšák2016-02-091-9/+21
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: make LLVM IR dumping less messyMarek Olšák2016-02-093-9/+15
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: move a few r600_can_dump_shader calls to where they're neededMarek Olšák2016-02-091-5/+5
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: remove useless code that handles dx10_clamp_modeMarek Olšák2016-02-093-14/+6
| | | | | | | "enable-no-nans-fp-math" is a wrong string and there was a disagreement about fixing it. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: dump SPI_PS_INPUT values along with shader statsMarek Olšák2016-02-091-0/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: read SPI_PS_INPUT_ADDR from LLVM if it returns itMarek Olšák2016-02-093-2/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't force gl_SampleMaskIn to 1 for smoothingMarek Olšák2016-02-091-7/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: split PS input interpolation code into its own functionMarek Olšák2016-02-091-56/+71
| | | | | | This will be used by the fragment shader prolog. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: implement forcing per-sample_interpolation using the shader key onlyMarek Olšák2016-02-096-152/+55
| | | | | | | | | | | It was partly a state and partly emulated by shader code, but since we want to do this in a fragment shader prolog, we need to put it into the shader key, which will be used to generate the prolog. This also removes the spi_ps_input states and moves the registers to the PS state. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: remove si_shader::ps_input_interpolateMarek Olšák2016-02-092-6/+3
| | | | | | tgsi_shader_info has this too. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: move BCOLOR PS input locations after all other inputsMarek Olšák2016-02-093-29/+50
| | | | | | | | | | | | | | | | BCOLOR inputs were immediately after COLOR inputs. Thus, all following inputs were offset by 1 if color_two_side was enabled, and not offset if it was not enabled, which is a variation that's problematic if we want to have 1 variant per shader and the variant doesn't care about color_two_side (that should be handled by other bytecode attached at the beginning). Instead, move BCOLOR inputs after all other inputs, so BCOLOR0 is at location "num_inputs" if it's present. BCOLOR1 is next. This also allows removing si_shader::nparam and si_shader::ps_input_param_offset, which are useless now. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: move SPI_PS_INPUT_CNTL value computation to a separate functionMarek Olšák2016-02-091-34/+40
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: generate a color_two_side variant only if the shader reads colorsMarek Olšák2016-02-091-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: move si_shader_context initialization into a separate functionMarek Olšák2016-02-091-43/+60
| | | | | | This will be re-used later. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: remove st_is_program_nativeMarek Olšák2016-02-091-13/+0
| | | | | | The default scenario sets GL_TRUE too. Reviewed-by: Edward O'Callaghan <[email protected]>
* st/mesa: unify destroy_program_variants cases for TCS, TES, GSMarek Olšák2016-02-091-50/+16
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* st/mesa: unify get_variant functions for TCS, TES, GSMarek Olšák2016-02-093-176/+31
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* st/mesa: unify variants and delete functions for TCS, TES, GSMarek Olšák2016-02-095-214/+108
| | | | | | no difference between those Reviewed-by: Edward O'Callaghan <[email protected]>
* mesa: fix incorrect viewport position when GL_CLIP_ORIGIN = GL_LOWER_LEFTBrian Paul2016-02-091-2/+2
| | | | | | | | | Ilia Mirkin found/fixed the mistake. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93813 Cc: "11.1" <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: rewrite save_CallLists() codeBrian Paul2016-02-091-26/+35
| | | | | | | | When glCallLists() is compiled into a display list, preserve the call as a single glCallLists rather than 'n' glCallList calls. This will matter for an upcoming display list optimization project. Reviewed-by: Ian Romanick <[email protected]>
* mesa: add missing error check in _mesa_CallLists()Brian Paul2016-02-091-0/+8
| | | | | | | | Generate GL_INVALID_VALUE if n < 0. Return early if n==0 or lists==NULL. v2: fix formatting, also check for lists==NULL. Reviewed-by: Ian Romanick <[email protected]>
* mesa: whitespace clean-ups in dlist.hBrian Paul2016-02-091-16/+31
| | | | And remove 'extern' qualifiers.
* st/mesa: don't allocate bitmap drawing state until neededBrian Paul2016-02-093-72/+77
| | | | | | | | | Most apps don't use glBitmap so don't allocate the bitmap cache or gallium state objects/shaders/etc until the first call to st_Bitmap(). v2: simplify a conditional, per Gustaw Smolarczyk. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: move the setup_bitmap_vertex_data() code into draw_bitmap_quad()Brian Paul2016-02-091-90/+78
| | | | | | Now all the code to setup the vertex data and draw it is in one place. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: refactor some bitmap drawing codeBrian Paul2016-02-091-33/+57
| | | | | | | Move setup/restoration of rendering state into helper functions. This makes the draw_bitmap_quad() function much more concise. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: remove hack to fix up GL_ANY_SAMPLES_PASSED resultsIlia Mirkin2016-02-091-5/+0
| | | | | | | | | | Both st/mesa and i965 should return a true/false result now, and the only other driver implementing queries (radeon) doesn't support ARB_occlusion_query2 which added that pname. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: make use of the occlusion predicate queryIlia Mirkin2016-02-091-2/+10
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* nv50: add PIPE_QUERY_OCCLUSION_PREDICATE supportIlia Mirkin2016-02-091-0/+6
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* nv30: add PIPE_QUERY_OCCLUSION_PREDICATE supportIlia Mirkin2016-02-091-2/+5
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* ilo: add PIPE_QUERY_OCCLUSION_PREDICATE supportIlia Mirkin2016-02-093-1/+12
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* draw: use util_pstipple_* function for stipple pattern textures and samplersNicolai Hähnle2016-02-093-112/+18
| | | | | | | | This reduces code duplication. Suggested-by: Jose Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* draw: use util_pstipple_create_fragment_shaderNicolai Hähnle2016-02-091-197/+12
| | | | | | | | | This reduces code duplication. It also adds support for drivers where the fragment position is a system value. Suggested-by: Jose Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* winsys/radeon: fix a wrong NUM_TILE_PIPES value from the kernelMarek Olšák2016-02-091-0/+6
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94019 Tested-by: Nick Sarnie <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* nir: remove unused nir_variable fieldsTimothy Arceri2016-02-092-20/+0
| | | | | | | These are used in GLSL IR to removed unused varyings and match transform feedback variables. There is no need to use these in NIR. Reviewed-by: Kenneth Graunke <[email protected]>