* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
+ * distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "main/glheader.h"
#include "main/enums.h"
#include "main/image.h"
#include "main/glformats.h"
struct brw_context *brw = brw_context(ctx);
struct intel_buffer_object *src = intel_buffer_object(unpack->BufferObj);
GLuint src_offset;
- drm_intel_bo *src_buffer;
+ struct brw_bo *src_buffer;
DBG("%s\n", __func__);
format, type, 0, 0, 0);
src_buffer = intel_bufferobj_buffer(brw, src, src_offset,
- height * src_stride);
+ height * src_stride, false);
struct intel_mipmap_tree *pbo_mt =
intel_miptree_create_for_bo(brw,
src_offset,
width, height, 1,
src_stride,
- 0);
+ ISL_TILING_LINEAR,
+ MIPTREE_CREATE_DEFAULT);
if (!pbo_mt)
return false;
pbo_mt, 0, 0,
0, 0, src_flip,
irb->mt, irb->mt_level, irb->mt_layer,
- x, y, _mesa_is_winsys_fbo(ctx->DrawBuffer),
- width, height, GL_COPY)) {
+ x, y, ctx->DrawBuffer->FlipY,
+ width, height, COLOR_LOGICOP_COPY)) {
DBG("%s: blit failed\n", __func__);
intel_miptree_release(&pbo_mt);
return false;
return;
}
- if (_mesa_is_bufferobj(unpack->BufferObj)) {
+ if (brw->screen->devinfo.gen < 6 &&
+ _mesa_is_bufferobj(unpack->BufferObj)) {
if (do_blit_drawpixels(ctx, x, y, width, height, format, type, unpack,
pixels)) {
return;