/aosp_15_r20/external/mesa3d/src/gallium/drivers/llvmpipe/ |
H A D | lp_setup_tri.c | 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 39 altivec.h inclusion in -std=c++98..11 causes bool to be redefined 86 * Alloc space for a new triangle plus the input.a0/dadx/dady arrays 88 * The memory is allocated from the per-scene pool, not per-tile. 90 * \return pointer to triangle space 111 tri->inputs.stride = input_array_sz; in lp_setup_alloc_triangle() 117 assert(b - a == tri_size); in lp_setup_alloc_triangle() 129 const struct lp_setup_variant_key *key = &setup->setup.variant->key; in lp_setup_print_vertex() 135 for (int i = 0; i < key->num_inputs; i++) { in lp_setup_print_vertex() 136 const float *in = v[key->inputs[i].src_index]; in lp_setup_print_vertex() [all …]
|
H A D | lp_setup_vbuf.c | 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 73 * The draw module may have issued additional state-change commands. in lp_setup_get_vertex_info() 77 return setup->vertex_info; in lp_setup_get_vertex_info() 88 if (setup->vertex_buffer_size < size) { in lp_setup_allocate_vertices() 89 align_free(setup->vertex_buffer); in lp_setup_allocate_vertices() 90 setup->vertex_buffer = align_malloc(size, 16); in lp_setup_allocate_vertices() 91 setup->vertex_buffer_size = size; in lp_setup_allocate_vertices() 94 setup->vertex_size = vertex_size; in lp_setup_allocate_vertices() 95 setup->nr_vertices = nr_vertices; in lp_setup_allocate_vertices() 97 return setup->vertex_buffer != NULL; in lp_setup_allocate_vertices() [all …]
|
H A D | lp_setup_analysis.c | 3 * Copyright 2010-2021 VMWare, Inc. 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 61 const float (*v2)[4]) in is_zero_area() 63 /* Specialized test for v0.y == v1.y == v2.y. in is_zero_area() 66 v0[0][1] == v2[0][1]); in is_zero_area() 71 * Assuming axis-aligned stretch blit (s a function of x alone, t a 74 * vx------+ 77 * out-----vy 93 /* Calculate axis-aligned interpolant for s as a function of x. 101 *a = (s0 - s1) / (x0 - x1); in calc_interps() [all …]
|
H A D | lp_setup_rect.c | 3 * Copyright 2010-2021 VMware, Inc. 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 29 * Setup/binning code for screen-aligned quads. 43 #define UNDETERMINED_BLIT -1 56 * The memory is allocated from the per-scene pool, not per-tile. 71 rect->inputs.stride = input_array_sz; in lp_setup_alloc_rectangle() 78 * The rectangle covers the whole tile- shade whole tile. 79 * XXX no rectangle/triangle dependencies in this file - share it with 88 struct lp_scene *scene = setup->scene; in lp_setup_whole_tile() 95 * - For layered rendering we can't determine if this covers the same in lp_setup_whole_tile() [all …]
|
H A D | lp_setup_context.h | 3 * Copyright 2007-2009 VMware, Inc. 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 30 * The setup code is concerned with point/line/triangle setup and 65 * Point/line/triangle setup context. 184 void (*triangle)(struct lp_setup_context *, member 187 const float (*v2)[4]); 193 const float (*v2)[4], 205 scis_planes[0] = (bbox->x0 < scissor->x0); in scissor_planes_needed() 207 scis_planes[1] = (bbox->x1 > scissor->x1); in scissor_planes_needed() 209 scis_planes[2] = (bbox->y0 < scissor->y0); in scissor_planes_needed() [all …]
|
H A D | lp_setup.c | 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 31 * Builds per-tile display lists and executes them on calls to 72 if (setup->scenes[0]->fence) { in lp_setup_wait_empty_scene() 73 lp_fence_wait(setup->scenes[0]->fence); in lp_setup_wait_empty_scene() 74 lp_scene_end_rasterization(setup->scenes[0]); in lp_setup_wait_empty_scene() 83 assert(setup->scene == NULL); in lp_setup_get_empty_scene() 87 for (i = 0; i < setup->num_active_scenes; i++) { in lp_setup_get_empty_scene() 88 if (setup->scenes[i]->fence) { in lp_setup_get_empty_scene() 89 if (lp_fence_signalled(setup->scenes[i]->fence)) { in lp_setup_get_empty_scene() 90 lp_scene_end_rasterization(setup->scenes[i]); in lp_setup_get_empty_scene() [all …]
|
/aosp_15_r20/external/swiftshader/src/Pipeline/ |
H A D | SetupRoutine.cpp | 7 // http://www.apache.org/licenses/LICENSE-2.0 50 const bool triangle = state.isDrawTriangle; in generate() local 52 const int V0 = OFFSET(Triangle, v0); in generate() 53 const int V1 = (triangle || line) ? OFFSET(Triangle, v1) : OFFSET(Triangle, v0); in generate() 54 …const int V2 = triangle ? OFFSET(Triangle, v2) : (line ? OFFSET(Triangle, v1) : OFFSET(Triangle, v… in generate() local 58 Pointer<Byte> v2 = tri + V2; in generate() local 65 X[2] = *Pointer<Int>(v2 + OFFSET(Vertex, projected.x)); in generate() 69 Y[2] = *Pointer<Int>(v2 + OFFSET(Vertex, projected.y)); in generate() 74 if(triangle) in generate() 84 Float A = (y0 - y2) * x1 + (y2 - y1) * x0 + (y1 - y0) * x2; // Area in generate() [all …]
|
/aosp_15_r20/external/deqp/framework/referencerenderer/ |
H A D | rrRenderer.cpp | 1 /*------------------------------------------------------------------------- 3 * ----------------------------------------------- 11 * http://www.apache.org/licenses/LICENSE-2.0 22 *//*--------------------------------------------------------------------*/ 102 /*--------------------------------------------------------------------*//*! 104 *//*--------------------------------------------------------------------*/ 110 return tcu::IVec4(pos.x(), pos.y(), endPos.x() - pos.x(), endPos.y() - pos.y()); in rectIntersection() 113 void convertPrimitiveToBaseType(std::vector<pa::Triangle> &output, std::vector<pa::Triangle> &input) in convertPrimitiveToBaseType() 134 const int baseProvokingVertexIndex = adjacentProvokingVertex - 1; in convertPrimitiveToBaseType() 135 … output[i] = pa::Line(input[i].v1, input[i].v2, baseProvokingVertexIndex); in convertPrimitiveToBaseType() [all …]
|
H A D | rrPrimitiveAssembler.hpp | 3 /*------------------------------------------------------------------------- 5 * ----------------------------------------------- 13 * http://www.apache.org/licenses/LICENSE-2.0 24 *//*--------------------------------------------------------------------*/ 34 struct Triangle struct 41 Triangle(void) : v0(DE_NULL), v1(DE_NULL), v2(DE_NULL), provokingIndex(-1) in Triangle() function 45 Triangle(VertexPacket *v0_, VertexPacket *v1_, VertexPacket *v2_, int provokingIndex_) in Triangle() function 48 , v2(v2_) in Triangle() 62 return v2; in getProvokingVertex() 71 VertexPacket *v2; member [all …]
|
/aosp_15_r20/external/swiftshader/src/Device/ |
H A D | Renderer.cpp | 7 // http://www.apache.org/licenses/LICENSE-2.0 67 index--; in setBatchIndices() 197 draw->id = id; in draw() 199 const vk::GraphicsState &pipelineState = pipeline->getCombinedState(dynamicState); in draw() 203 // pre-rasterization subsets, but only includes fragment and fragment output interface in draw() 220 pixelProcessor.setBlendConstant(fragmentOutputInterfaceState->getBlendConstants()); in draw() 223 const vk::Inputs &inputs = pipeline->getInputs(); in draw() 229 const sw::SpirvShader *fragmentShader = pipeline->getShader(VK_SHADER_STAGE_FRAGMENT_BIT).get(); in draw() 230 const sw::SpirvShader *vertexShader = pipeline->getShader(VK_SHADER_STAGE_VERTEX_BIT).get(); in draw() 232 const vk::Attachments attachments = pipeline->getAttachments(); in draw() [all …]
|
/aosp_15_r20/frameworks/libs/systemui/weathereffects/graphics/assets/shaders/ |
D | simplex2d.agsl | 8 * http://www.apache.org/licenses/LICENSE-2.0 17 const float SKEW = 0.366025404; // (sqrt(3)-1)/2 18 const float UNSKEW = 0.211324865; // (3-sqrt(3))/6 22 return fract(sin(p) * 877.343) * 2. -1.; // [-1, 1] 26 return fract(sin(dot(p, vec2(343.0, 49.0)))) * 2. -1.; // [-1, 1] 34 return a - (b * (a / b)); 37 // 2D hash without bit-wise operations 42 a = imod((10 - imod((a + b), 10)), 10); // a ^ b = (base - (a + b) % base) % base 50 // Returns kernel summation from the given simplex vertices (v0, v1, v2), and their corresponding 52 float kernel_summation(vec2 v0, vec2 v1, vec2 v2, vec2 g0, vec2 g1, vec2 g2) { [all …]
|
/aosp_15_r20/external/deqp/external/openglcts/modules/gl/ |
H A D | gl4cTextureBarrierTests.cpp | 1 /*------------------------------------------------------------------------- 3 * ----------------------------- 5 * Copyright (c) 2014-2016 The Khronos Group Inc. 11 * http://www.apache.org/licenses/LICENSE-2.0 22 */ /*-------------------------------------------------------------------*/ 27 */ /*-------------------------------------------------------------------*/ 244 (1) Generate an irregular grid covering the whole screen (i.e. (-1,-1) to (1,1)); 246 (3) Shuffle the generated triangle list; 247 (4) Write the vertices of the shuffled triangle list to the destination address. */ 259 Vertex v0, v1, v2; in generateVertexData() member [all …]
|
/aosp_15_r20/external/mesa3d/src/gallium/drivers/softpipe/ |
H A D | sp_setup.c | 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 52 * Triangle edge info 55 float dx; /**< X(v1) - X(v0), used only during setup */ 56 float dy; /**< Y(v1) - Y(v0), used only during setup */ 65 * This can't be arbitrarily increased since we depend on some 32-bit 72 * Triangle setup info. 126 * Clip setup->quad against the scissor/surface bounds. 132 const struct pipe_scissor_state *cliprect = &setup->softpipe->cliprect[viewport_index]; in quad_clip() 133 const int minx = (int) cliprect->minx; in quad_clip() 134 const int maxx = (int) cliprect->maxx; in quad_clip() [all …]
|
/aosp_15_r20/hardware/interfaces/automotive/sv/1.0/ |
H A D | types.hal | 8 * http://www.apache.org/licenses/LICENSE-2.0 50 /** (x, y) data is only valid if isValid is true. Units are pixels or milli-meters. */ 61 * (x, y, z) data is only valid if isValid is true. Units are milli-meters. 78 * Translation part of the pose, in (x, y, z) format with milli-meter units. 96 * https://source.android.com/devices/sensors/sensor-types#auto_axes 97 * The virtual view axes are defined as +Y as look-at direction, +X as right direction and 111 * Here the view axes are rotated by 90 counter-clockwise w.r.t android automotive axes. 114 * Translation = (4, 2, 0) in meters = (2000, 4000, 0) in milli-meters. 144 * Elapsed real-time nanoseconds of earliest camera frame from the set of camera 220 * https://source.android.com/devices/sensors/sensor-types#auto_axes [all …]
|
/aosp_15_r20/external/deqp/external/vulkancts/modules/vulkan/tessellation/ |
H A D | vktTessellationMiscDrawTests.cpp | 1 /*------------------------------------------------------------------------ 3 * ------------------------ 12 * http://www.apache.org/licenses/LICENSE-2.0 23 *//*--------------------------------------------------------------------*/ 114 positions.push_back(tcu::Vec2(0.0f, -0.786f)); in genVertexPositions() 115 positions.push_back(tcu::Vec2(-0.8f, 0.6f)); in genVertexPositions() 119 positions.push_back(tcu::Vec2(-0.8f, -0.8f)); in genVertexPositions() 120 positions.push_back(tcu::Vec2(0.8f, -0.8f)); in genVertexPositions() 121 positions.push_back(tcu::Vec2(-0.8f, 0.8f)); in genVertexPositions() 300 // Copy render result to a host-visible buffer in runTest() [all …]
|
/aosp_15_r20/external/deqp/external/openglcts/modules/glesext/geometry_shader/ |
H A D | esextcGeometryShaderRendering.cpp | 1 /*------------------------------------------------------------------------- 3 * ----------------------------- 5 * Copyright (c) 2014-2016 The Khronos Group Inc. 11 * http://www.apache.org/licenses/LICENSE-2.0 22 */ /*-------------------------------------------------------------------*/ 443 /* Retrieve iteration-specific input layout qualifier and draw call mode data */ in init() 666 /** Executes actual geometry shader-based rendering test, using an user-specified draw call. 689 /* Reduce n_instances to 1 for non-instanced draw call modes */ in executeTest() 703 /* Retrieve render-target size */ in executeTest() 790 GLU_EXPECT_NO_ERROR(gl.getError(), "Test set-up failed."); in executeTest() [all …]
|
/aosp_15_r20/frameworks/base/core/java/android/app/wallpapereffectsgeneration/ |
H A D | TexturedMesh.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 68 * Indices layout is triangle. Vertices are grouped into 3 and each 69 * group forms a triangle. 90 * of [x1, y1, z1, u1, v1, x2, y2, z2, u2, v2, ...]. 132 * indices 0, 1, 2 forms a triangle, indices 3, 4, 5 form another triangle. 141 * result, the vertices array can represent different per-vertex coordinates. For example, 143 * [x1, y1, z1, u1, v1, x2, y2, z2, u2, v2, ...]. 227 * with INDICES_LAYOUT_TRIANGLES, indices 0, 1, 2 forms a triangle, indices 3, 4, 5 228 * form another triangle. 237 * Set the required vertices. The vertices array should represent per-vertex coordinates. [all …]
|
/aosp_15_r20/external/mesa3d/src/intel/vulkan/grl/gpu/ |
H A D | bvh_build_presplit.cl | 2 // Copyright (C) 2009-2021 Intel Corporation 4 // SPDX-License-Identifier: MIT 26 This function splits a line v0->v1 at position pos in dimension dim 53 const float f = (pos - v0d) / (v1d - v0d); 54 const float4 c = f * (v1 - v0) + v0; 62 This function splits a clipped triangle v0,v1,v2 with bounds prim at 64 right clipped triangle fragments into lbounds and rbounds. 73 const float4 v2, 77 /* clip each triangle edge */ 79 splitLine(dim, pos, v1, v2, lbounds, rbounds); [all …]
|
/aosp_15_r20/external/skia/src/gpu/ganesh/geometry/ |
H A D | GrQuadUtils.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 28 // General tolerance used for denominators, checking div-by-0 29 static constexpr float kTolerance = 1e-9f; 31 static constexpr float kDistTolerance = 1e-2f; 52 // Replaces zero-length 'bad' edge vectors with the reversed opposite edge vector. 56 // Want opposite edges, L B T R -> R T B L but with flipped sign to preserve winding in correct_bad_edges() 57 *e1 = if_then_else(bad, -next_diag(*e1), *e1); in correct_bad_edges() 58 *e2 = if_then_else(bad, -next_diag(*e2), *e2); in correct_bad_edges() 60 *e3 = if_then_else(bad, -next_diag(*e3), *e3); in correct_bad_edges() 78 static void interpolate_local(float alpha, int v0, int v1, int v2, int v3, in interpolate_local() argument [all …]
|
/aosp_15_r20/external/deqp/modules/gles3/functional/ |
H A D | es3fClippingTests.cpp | 1 /*------------------------------------------------------------------------- 3 * ------------------------------------------------- 11 * http://www.apache.org/licenses/LICENSE-2.0 22 *//*--------------------------------------------------------------------*/ 94 return tcu::boolAll(tcu::lessThanEqual(tcu::abs(a - halfFilled), threshold)); in isHalfFilled() 121 return tcu::boolAll(tcu::lessThanEqual(tcu::abs(a - b), threshold)); in compareColoredPixels() 139 /*--------------------------------------------------------------------*//*! 147 * Return values: -1 = Perfect match 150 *//*--------------------------------------------------------------------*/ 159 int compareFailed = -1; in compareImages() [all …]
|
H A D | es3fRasterizationTests.cpp | 1 /*------------------------------------------------------------------------- 3 * ------------------------------------------------- 11 * http://www.apache.org/licenses/LICENSE-2.0 22 *//*--------------------------------------------------------------------*/ 114 SAMPLE_COUNT_MAX = -2, 154 , m_numSamples(-1) in BaseRenderingCase() 155 , m_subpixelBits(-1) in BaseRenderingCase() 170 DE_ASSERT((m_numRequestedSamples == -1) == (m_renderTarget != RENDERTARGET_RBO_MULTISAMPLE)); in BaseRenderingCase() 183 int msaaTargetSamples = -1; in init() 217 if (!m_shader->isOk()) in init() [all …]
|
/aosp_15_r20/external/deqp/modules/gles2/functional/ |
H A D | es2fClippingTests.cpp | 1 /*------------------------------------------------------------------------- 3 * ------------------------------------------------- 11 * http://www.apache.org/licenses/LICENSE-2.0 22 *//*--------------------------------------------------------------------*/ 91 return tcu::boolAll(tcu::lessThanEqual(tcu::abs(a - halfFilled), threshold)); in isHalfFilled() 118 return tcu::boolAll(tcu::lessThanEqual(tcu::abs(a - b), threshold)); in compareColoredPixels() 136 /*--------------------------------------------------------------------*//*! 144 * Return values: -1 = Perfect match 147 *//*--------------------------------------------------------------------*/ 156 int compareFailed = -1; in compareImages() [all …]
|
H A D | es2fRasterizationTests.cpp | 1 /*------------------------------------------------------------------------- 3 * ------------------------------------------------- 11 * http://www.apache.org/licenses/LICENSE-2.0 22 *//*--------------------------------------------------------------------*/ 111 , m_numSamples(-1) in BaseRenderingCase() 112 , m_subpixelBits(-1) in BaseRenderingCase() 180 if (!m_shader->isOk()) in init() 207 const glw::GLint positionLoc = gl.getAttribLocation(m_shader->getProgram(), "a_position"); in drawPrimitives() 208 const glw::GLint colorLoc = gl.getAttribLocation(m_shader->getProgram(), "a_color"); in drawPrimitives() 209 const glw::GLint pointSizeLoc = gl.getUniformLocation(m_shader->getProgram(), "u_pointSize"); in drawPrimitives() [all …]
|
/aosp_15_r20/external/deqp/external/openglcts/modules/glesext/tessellation_shader/ |
H A D | esextcTessellationShaderVertexSpacing.cpp | 1 /*------------------------------------------------------------------------- 3 * ----------------------------- 5 * Copyright (c) 2014-2016 The Khronos Group Inc. 11 * http://www.apache.org/licenses/LICENSE-2.0 22 */ /*-------------------------------------------------------------------*/ 34 const float epsilon = 1e-3f; 38 /** Compares two barycentric/cartesian coordinates, using test-wide epsilon. 47 …if (de::abs(this->u - in.u) < epsilon && de::abs(this->v - in.v) < epsilon && de::abs(this->w - in… in operator ==() 57 /** Compares two Cartesian coordinates, using test-wide epsilon. 66 if (de::abs(this->x - in.x) < epsilon && de::abs(this->y - in.y) < epsilon) in operator ==() [all …]
|
/aosp_15_r20/external/mesa3d/src/gallium/auxiliary/draw/ |
H A D | draw_pipe_cull.c | 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 62 const unsigned pos = draw_current_shader_position_output(stage->draw); in cull_tri() 64 const float *v0 = header->v[0]->data[pos]; in cull_tri() 65 const float *v1 = header->v[1]->data[pos]; in cull_tri() 66 const float *v2 = header->v[2]->data[pos]; in cull_tri() local 68 /* edge vectors: e = v0 - v2, f = v1 - v2 */ in cull_tri() 69 const float ex = v0[0] - v2[0]; in cull_tri() 70 const float ey = v0[1] - v2[1]; in cull_tri() 71 const float fx = v1[0] - v2[0]; in cull_tri() 72 const float fy = v1[1] - v2[1]; in cull_tri() [all …]
|