Lines Matching defs:data
596 /** Tells how many bits per components should be used to define input data with
1278 /* Iterate over the data array and push those internalformats that match the requested view class */
1291 } /* for (all pairs in the data array) */
1833 * preparing texel data. Make extra sure we're not wrong. */
2077 } /* for (all pairs in data array) */
3428 DE_NULL, /* data */
4213 : TestCase(context, "view_sampling", "Verify that sampling data from texture views, that use internal "
4457 /* Allocate enough space to hold reference color data for all sample s*/
4553 /* Update local reference color data storage */
4585 /* In order to verify if the texel data was sampled correctly, we need to do two things:
4618 m_testCtx.getLog() << tcu::TestLog::Message << "Invalid data was sampled in vertex shader stage."
4627 << "Invalid data was sampled in tessellation control shader stage."
4636 << "Invalid data was sampled in tessellation evaluation shader stage."
4644 m_testCtx.getLog() << tcu::TestLog::Message << "Invalid data was sampled in geometry shader stage."
4678 m_testCtx.getLog() << tcu::TestLog::Message << "Invalid data was sampled at (" << x << ", " << y
4699 /* Release the reference color data buffer */
4750 * @return Requested color data.
4795 result = m_reference_color_storage->data[index];
4847 /** Initializes iteration-specific program object used to sample the texture data. */
5871 /* Generate and configure BO storage to hold result XFB data of a single
6413 /* If there's any data descriptor found allocated at this point,
6415 if (m_reference_color_storage->data != DE_NULL)
6417 delete[] m_reference_color_storage->data;
6419 m_reference_color_storage->data = DE_NULL;
6422 m_reference_color_storage->data = new tcu::Vec4[n_layers * n_faces * n_mipmaps * n_samples];
6459 m_reference_color_storage->data[index] = color;
6577 * @param data Raw data buffer to read the data from.
6581 * @param format Format to be used for data retrieval. This defines data format of
6583 * divide the read ubyte/ushort/uint data by maximum value allowed for
6590 void TextureViewTestViewClasses::getComponentDataForByteAlignedInternalformat(const unsigned char* data,
6604 data += (component_sizes[n_component] >> 3 /* 8 bits/byte */), ++n_component)
6613 result_float[n_component] = deFloat16To32(*(const deFloat16*)data);
6616 result_float[n_component] = *(float*)data;
6631 result_sint[n_component] = *(signed char*)data;
6634 result_sint[n_component] = *(signed short*)data;
6637 result_sint[n_component] = *(signed int*)data;
6652 result_float[n_component] = float(*(signed char*)data) / 127.0f;
6655 result_float[n_component] = float(*(signed short*)data) / 32767.0f;
6675 result_float[n_component] = float(*((unsigned char*)data)) / 255.0f;
6678 result_float[n_component] = float(*((unsigned short*)data)) / 65535.0f;
6693 result_uint[n_component] = *(unsigned char*)data;
6696 result_uint[n_component] = *(unsigned short*)data;
6699 result_uint[n_component] = *(unsigned int*)data;
6717 /** Initializes buffer object storage of sufficient size to hold data that will be
6731 /* Calculate how much size we will need to read the XFBed data. Each sampled data
6743 * NOTE: We do not care about the data type of the stored data, since sizes of the
6752 gl.bufferData(GL_TRANSFORM_FEEDBACK_BUFFER, m_bo_size, DE_NULL, /* data */
6756 /* For XFB, we'll be outputting data sampled from both the texture and the view.
6757 * Sampled texture data will go to the first half of the buffer, and the corresponding
6758 * view data will go to the one half.
6760 * Store the offset, from which the view's data will start so that we can correctly
7036 * data we will need to fill a 4x4 mip-map, given the requested internalformat.
7044 * using raw decompressed data, we need to override caller-specified internalformat
7045 * with an internalformat that will describe decompressed data. The data will then
7078 /* For some internalformats, we need to use a special data type in order to avoid
7079 * implicit data conversion during glTexSubImage2D() call.
7109 /* Prepare data for texture */
7270 * "regular" 32-bit floating-point data, we need to convert the values we initialized
7282 /* Create a temporary texture object we'll use to compress the floating-point data. */
7294 /* Submit floating-point decompressed data */
7322 /* Fill the mip-map with data */
7394 * hold the result data.
7452 /** Verifies the data XFBed out by the test's vertex shader is valid.
7473 /* For quite a number of cases, we can do a plain memcmp() applied to sampled texture/view data.
7486 * data.
7489 * Note that in step 2) we're dealing with data that is returned by float/int/uint samplers,
7490 * so we need to additionally process the data that we obtain by "casting" input data to
7493 * Finally, if the reference values are calculated for compressed data, we decompress it
7524 /* Each component of decompressed data will be retrieved as a 32-bit FP */
7534 /* Each component of decompressed data is stored as either signed or unsigned
7545 /* If we need to use compressed data as reference, we need to ask GL to decompress
7546 * the mipmap data using view-specific internalformat.
7596 * NOTE: We cast input mip-map's data to view's internalformat, which is
7612 /* Retrieve data sampled from the view */
7647 /* Compute reference data. Handle non-byte aligned internalformats manually. */
7866 m_testCtx.getLog() << tcu::TestLog::Message << "Invalid data sampled from a texture view "
7888 << tcu::TestLog::Message << "Invalid data sampled from a signed integer texture view "
7909 << tcu::TestLog::Message << "Invalid data sampled from an unsigned integer texture view "
7940 m_testCtx.getLog() << tcu::TestLog::Message << "Invalid data read from a view of internalformat "
7946 /* Form texture and view data strings */
7956 mipmap_data_sstream << "Mip-map data: [";
7957 sampled_view_data_sstream << "Sampled view data: [";
7989 m_testCtx.getLog() << tcu::TestLog::Message << "Correct data read from a view of internalformat "
8113 /* Good to release static color data buffer at this point */
8133 /* Bind the sibling object so that we can make sure the data read from the
8185 TCU_FAIL("Invalid data was sampled in vertex shader");
8212 * using a program object, or by CPU with the data
8254 * gradient data. Set up draw framebuffer */
8388 /* Verify the XFBed data */
8396 m_testCtx.getLog() << tcu::TestLog::Message << "Invalid data was sampled at "
8404 TCU_FAIL("Invalid data sampled");
8416 /* Allocate space for the data */
8419 /* Retrieve the rendered data */
8430 /* Verify the data is correct */
8466 /* Good to release the data buffer at this point */
8474 TCU_FAIL("Invalid data sampled");
8603 /** Allocates a sufficiently large buffer for RGBA8 data and fills it with
8683 /** Allocates a sufficiently large buffer to hold RGBA8 data of user-specified resolution
8689 * @param width Width of the mip-map the buffer will be used as a data source for;
8690 * @param height Height of the mip-map the buffer will be used as a data source for;
8696 /* Prepare the data buffer storing the data we want to replace the region of the
8697 * data source with.
8792 gl.bufferData(GL_TRANSFORM_FEEDBACK_BUFFER, bo_size, DE_NULL, /* data */
9571 /* Finally, allocate space for buffers that will be filled with rendered data */
9617 /* Allocate space for the layer data */
9620 unsigned char* data = new unsigned char[mipmap_width * mipmap_height * m_texture_n_components];
9622 if (data == NULL)
9627 /* Fill the buffer with layer data */
9632 unsigned char* row_data_ptr = data + mipmap_width * y * pixel_size;
9648 /* Upload the layer data */
9651 mipmap_width, mipmap_height, GL_RGBA, GL_UNSIGNED_BYTE, data);
9653 /* Release the data buffer */
9654 delete[] data;
9656 data = DE_NULL;
9712 /* Bind the data texture */
9745 * quad with the sampled data */
9761 /* Now that we have both pieces of data, we can proceed with actual verification */
9815 TCU_FAIL("Rendered data does not match expected pixel data");
9941 " vec4 data = textureLod(sampler, vec2(0.5, 0.5), lod);\n"
9944 " if (abs(data.r - expected_texel.r) > epsilon ||\n"
9945 " abs(data.g - expected_texel.g) > epsilon ||\n"
9946 " abs(data.b - expected_texel.b) > epsilon ||\n"
9947 " abs(data.a - expected_texel.a) > epsilon)\n"
10127 gl.bufferData(GL_TRANSFORM_FEEDBACK_BUFFER, bo_size, DE_NULL, /* data */
10268 m_testCtx.getLog() << tcu::TestLog::Message << "Invalid data was sampled for mip-map level ["