Re: [Mesa-dev] [PATCH V5 7/7] intel: implement create image from texture

2013-01-23 Thread Abdiel Janulgue
On Tuesday, January 22, 2013 11:02:34 AM Eric Anholt wrote: 128 pixels of 32bpp is a tile width, and 128 pixels high of that is 16 tiles. The values I see this function having are: mask_x = 127 mask_y = 15 draw_x = 0 draw_y = 128 image-offset = (16 * 4096) So when we go to texture

[Mesa-dev] [PATCH V6 0/8] intel: add support for EGL_KHR_gl_image

2013-01-25 Thread Abdiel Janulgue
- Rename draw_x/y to tile_x/y in dri image struct. These are now used as adjustment pixels from our stored aligned offset to the exported image instead of the entire x/y offset from the base address. - Take into consideration the offset from our bo so that sub-image functions resolves

[Mesa-dev] [PATCH V6 1/8] dri2: Create image from texture

2013-01-25 Thread Abdiel Janulgue
Add create image from texture extension and bump version. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- include/GL/internal/dri_interface.h | 14 +- src/egl/drivers/dri2/egl_dri2.c | 85 +++ 2 files changed, 98 insertions(+), 1

[Mesa-dev] [PATCH V6 2/8] intel: expose dimensions and offsets of a miptree level in DRIImage

2013-01-25 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_regions.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h index 8737a6d..1eef3b5 100644

[Mesa-dev] [PATCH V6 3/8] intel: Expose intel_miptree_create_internal as intel_miptree_create_layout.

2013-01-25 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 37 src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 14 - 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers/dri

[Mesa-dev] [PATCH V6 4/8] intel: add pixel offset calculator for miptree levels

2013-01-25 Thread Abdiel Janulgue
Add helper to calculate fine-grained x and y adjustment pixels to an image within a miptree level for tiled regions. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 15 +++ src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH V6 5/8] i965: Account for offsets when updating SURFACE_STATE.

2013-01-25 Thread Abdiel Janulgue
If the offsets are present, this lets us specify a particular level and slice in a shared region using the base level of an exported mip-map tree. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 +++- src/mesa

[Mesa-dev] [PATCH V6 7/8] intel: Account for mt-offset in intel_miptree_map

2013-01-25 Thread Abdiel Janulgue
We need to take account the offset from original bo when using glTexSubImage() and other functions that manipulate the subregion of an exported texture. Offsets are appended to mapped region address and when blitting from a source region. Signed-off-by: Abdiel Janulgue abdiel.janul

[Mesa-dev] [PATCH V6 8/8] intel: implement create image from texture

2013-01-25 Thread Abdiel Janulgue
to offset alignment issues, report INVALID_OPERATION as per spec wording. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_screen.c | 179 + 1 file changed, 159 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH V6 6/8] intel: Create a miptree using offsets in intel_set_texture_image_region

2013-01-25 Thread Abdiel Janulgue
When binding a region to a texture image, re-create the miptree base-level considering the offset and dimension information exported by DRIImage. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_image.c | 31 -- 1

Re: [Mesa-dev] intel: Progress toward removing struct intel_region

2013-01-29 Thread Abdiel Janulgue
Hi, On Tuesday, January 29, 2013 04:00:28 PM Eric Anholt wrote: Part of my motivation here was the number of cache misses we have in the first reference of a region after referencing the miptree wrapping it, for things that should all live in the first cacheline of one struct. I think I've

Re: [Mesa-dev] [PATCH V6 0/8] intel: add support for EGL_KHR_gl_image

2013-01-29 Thread Abdiel Janulgue
On Tuesday, January 29, 2013 07:54:59 AM Eric Anholt wrote: Abdiel Janulgue abdiel.janul...@linux.intel.com writes: - Rename draw_x/y to tile_x/y in dri image struct. These are now used as adjustment pixels from our stored aligned offset to the exported image instead of the entire x

[Mesa-dev] [PATCH V7 0/8] intel: add support for EGL_KHR_gl_image

2013-01-30 Thread Abdiel Janulgue
KHR_gl_image7 branch CC: Eric Anholt e...@anholt.net Reviewed-by: Eric Anholt e...@anholt.net (v6) Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org

[Mesa-dev] [PATCH V7 1/8] dri2: Create image from texture

2013-01-30 Thread Abdiel Janulgue
Add create image from texture extension and bump version. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- include/GL/internal/dri_interface.h | 14 +- src/egl/drivers/dri2/egl_dri2.c | 85 +++ 2 files changed, 98 insertions(+), 1

[Mesa-dev] [PATCH V7 2/8] intel: expose dimensions and offsets of a miptree level in DRIImage

2013-01-30 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_regions.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h index 1aff5d9..84cf08b 100644

[Mesa-dev] [PATCH V7 4/8] intel: add pixel offset calculator for miptree levels

2013-01-30 Thread Abdiel Janulgue
Add helper to calculate fine-grained x and y adjustment pixels to an image within a miptree level for tiled regions. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 15 +++ src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH V7 5/8] i965: Account for offsets when updating SURFACE_STATE.

2013-01-30 Thread Abdiel Janulgue
If the offsets are present, this lets us specify a particular level and slice in a shared region using the base level of an exported mip-map tree. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 +++- src/mesa

[Mesa-dev] [PATCH V7 6/8] intel: Create a miptree using offsets in intel_set_texture_image_region

2013-01-30 Thread Abdiel Janulgue
When binding a region to a texture image, re-create the miptree base-level considering the offset and dimension information exported by DRIImage. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_image.c | 30 -- 1

[Mesa-dev] [PATCH V8 7/8] intel: Account for mt-offset in intel_miptree_map

2013-01-30 Thread Abdiel Janulgue
We need to take account the offset from original bo when using glTexSubImage() and other functions that manipulate the subregion of an exported texture. Offsets are appended to mapped region address and when blitting from a source region. Signed-off-by: Abdiel Janulgue abdiel.janul

[Mesa-dev] [PATCH V7 8/8] intel: implement create image from texture

2013-01-30 Thread Abdiel Janulgue
to offset alignment issues, report INVALID_OPERATION as per spec wording. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_screen.c | 179 + 1 file changed, 159 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH] intel: implement create image from texture (v8)

2013-01-31 Thread Abdiel Janulgue
to offset alignment issues, report INVALID_OPERATION as per spec wording. v8: Bump intelImageExtension version Reviewed-by: Eric Anholt e...@anholt.net (v6) Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_screen.c | 181

Re: [Mesa-dev] [PATCH] intel: implement create image from texture (v8)

2013-02-01 Thread Abdiel Janulgue
On Thursday, January 31, 2013 10:31:33 AM Chad Versace wrote: +#include egl/main/eglcurrent.h +static __DRIimage * +intel_create_image_from_texture(__DRIcontext *context, int target, +unsigned texture, int zoffset, +

[Mesa-dev] [PATCH] intel: Create a miptree using offsets in intel_set_texture_image_region(v8)

2013-02-01 Thread Abdiel Janulgue
. This was spotted by Eric earlier. Reviewed-by: Eric Anholt e...@anholt.net (v6) Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_image.c | 60 +++--- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri

[Mesa-dev] [PATCH] intel: implement create image from texture(v9)

2013-02-01 Thread Abdiel Janulgue
Android build problems based on feedback from Adrian M Negreanu and Chad Versace. -Move the non-tile-aligned check and error-reporting to intel_set_texture_image_region Reviewed-by: Eric Anholt e...@anholt.net (v6) Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa

[Mesa-dev] [PATCH] intel: make sure to setup image dimension in image_from_planar setup

2013-02-04 Thread Abdiel Janulgue
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60212 Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_screen.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel

[Mesa-dev] [RFC] Enable Resource Streamer on Haswell

2013-07-08 Thread Abdiel Janulgue
-dev/2013-May/039088.html Abdiel Janulgue (12): intel: Add resource streamer control defines intel: On Haswell hardware, enable the resource streamer on batchbuffer start i965: Temporarily disable resource streamer when state base address is updated. i965: Add

[Mesa-dev] [RFC PATCH 01/12] intel: Add resource streamer control defines

2013-07-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/intel_reg.h |4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_reg.h b/src/mesa/drivers/dri/i965/intel_reg.h index f45a8f3..2cf68dd 100644 --- a/src/mesa/drivers

[Mesa-dev] [RFC PATCH 02/12] intel: On Haswell hardware, enable the resource streamer on batchbuffer start

2013-07-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/intel_batchbuffer.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 409df29..84736a8 100644

[Mesa-dev] [RFC PATCH 04/12] i965: Add MI_RS_STORE_DATA_IMM workaround for 3DPRIMITIVE commands

2013-07-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_draw.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 5730eed..436077b 100644 --- a/src/mesa

[Mesa-dev] [RFC PATCH 03/12] i965: Temporarily disable resource streamer when state base address is updated.

2013-07-08 Thread Abdiel Janulgue
Prior to changing the Surface State Base Address, the resouce streamer must be disabled within a batch buffer where the RS is enabled. RS is re-enabled again once the SBA is updated. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_misc_state.c

[Mesa-dev] [RFC PATCH 05/12] i965: Switch on hardware-generated binding tables.

2013-07-08 Thread Abdiel Janulgue
On Haswell hardware with resource streamer enabled, enable the on-chip hardware binding tables. The hw-bt can be updated directly using EDIT commands. Skip manual generation of binding tables when this is activated. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa

[Mesa-dev] [RFC PATCH 06/12] i965: Implement opcodes for the hw-generated binding table EDIT commands

2013-07-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_defines.h |5 + src/mesa/drivers/dri/i965/brw_state.h |6 ++ src/mesa/drivers/dri/i965/gen7_misc_state.c | 31 +++ 3 files changed, 42 insertions

[Mesa-dev] [RFC PATCH 07/12] i965: Use hw-bt for pull constants and VS UBO surface states.

2013-07-08 Thread Abdiel Janulgue
When surface_state pointing to pull constant surfaces are changed, update on-chip binding table. Same with VS ubo surface states. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 10 ++ 1 file changed, 10 insertions

[Mesa-dev] [RFC PATCH 11/12] i965/blorp: In blorp, update PS on-chip binding table when new surface state entries are generated

2013-07-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/gen6_blorp.cpp | 16 +++- src/mesa/drivers/dri/i965/gen7_blorp.cpp |3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src

[Mesa-dev] [RFC PATCH 12/12] i965/blorp: Add temporary work-around due to b607d57630daa7d92a84c41abfd45cacbe63f3d2

2013-07-08 Thread Abdiel Janulgue
Address GPU hung due to skipping selection of 3D pipeline in blorp when RS is switched on. I've yet to figure out the reason for this. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/gen6_blorp.cpp | 11 +++ 1 file changed, 11 insertions

[Mesa-dev] [RFC] intel: add support for EGL_KHR_gl_image

2012-12-14 Thread Abdiel Janulgue
This patch set adds support for KHR_gl_texture_2D_image, KHR_gl_texture_cubemap_image and KHR_gl_texture_3D_image for Gen 4 - Gen7 HW. The extension enables us to be a bit more conformant to the spec in Android at least. I've tested it on SandyBridge and IvyBridge. The approach is to export a

[Mesa-dev] [PATCH 1/6] dri2: Create image from texture

2012-12-14 Thread Abdiel Janulgue
Add create image from texture extension. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- include/GL/internal/dri_interface.h | 12 + src/egl/drivers/dri2/egl_dri2.c | 83 +++ 2 files changed, 95 insertions(+) diff --git a/include/GL

[Mesa-dev] [PATCH 2/6] intel: create a miptree for a region based on an offset, size, and level.

2012-12-14 Thread Abdiel Janulgue
Add intel_miptree_create_for_offset which adds support for creating a single- level miptree based on the existing offsets and dimensions of another mip-tree level. Use this function as well in intel_miptree_create_for_region, but for the whole region. Signed-off-by: Abdiel Janulgue abdiel.janul

[Mesa-dev] [PATCH 3/6] intel: add new miptree helper functions for linear copying of a miptree and calculating x and y offsets of a miptree level within a tiled region.

2012-12-14 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 31 src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 10 2 files changed, 41 insertions(+) diff --git a/src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH 4/6] i965: Account for offsets when emitting SURFACE_STATE.

2012-12-14 Thread Abdiel Janulgue
If the offsets are present, this lets us specify a particular level and slice in a shared region using the base level of an exported mip-map tree. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 +++- src/mesa

[Mesa-dev] [PATCH 5/6] intel: implement create image from texture

2012-12-14 Thread Abdiel Janulgue
Save miptree level info to DRIImage, taking offsets into consideration. For = gen4 hw which doesn't support non-tile aligned offset, re-create the mipmap tree internally before exporting the updated offsets to avoid alignment problems. Signed-off-by: Abdiel Janulgue abdiel.janul

[Mesa-dev] [PATCH 6/6] intel: Create a miptree using offsets in intel_set_texture_image_region

2012-12-14 Thread Abdiel Janulgue
When binding a region to a texture image, re-create the miptree base-level considering the offset and dimension information exported by DRIImage. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_image.c | 27 -- 1

Re: [Mesa-dev] [RFC] intel: add support for EGL_KHR_gl_image

2012-12-14 Thread Abdiel Janulgue
On Friday, December 14, 2012 03:28:12 PM Abdiel Janulgue wrote: This patch set adds support for KHR_gl_texture_2D_image, KHR_gl_texture_cubemap_image and KHR_gl_texture_3D_image for Gen 4 - Gen7 HW. The extension enables us to be a bit more conformant to the spec in Android at least. I've

Re: [Mesa-dev] [RFC] intel: add support for EGL_KHR_gl_image

2012-12-17 Thread Abdiel Janulgue
On Friday, December 14, 2012 11:38:04 AM Eric Anholt wrote: Abdiel Janulgue abdiel.janul...@linux.intel.com writes: This patch set adds support for KHR_gl_texture_2D_image, KHR_gl_texture_cubemap_image and KHR_gl_texture_3D_image for Gen 4 - Gen7 HW. The extension enables us to be a bit

[Mesa-dev] intel: add support for EGL_KHR_gl_image v2

2013-01-02 Thread Abdiel Janulgue
corrected offsets back to our exported image. In this version, for non-tile-aligned surfaces, we copy the image to a temporary single-level miptree and refer to the offsets there instead of re-creating the whole miptree from scratch. Tested on: Gen4, SandyBridge, IvyBridge Abdiel Janulgue (6

[Mesa-dev] [PATCH 1/6] dri2: Create image from texture

2013-01-02 Thread Abdiel Janulgue
Add create image from texture extension. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- include/GL/internal/dri_interface.h | 12 + src/egl/drivers/dri2/egl_dri2.c | 83 +++ 2 files changed, 95 insertions(+) diff --git a/include/GL

[Mesa-dev] [PATCH 2/6] intel: create a miptree for a region based on an offset, size, and level.

2013-01-02 Thread Abdiel Janulgue
Add intel_miptree_create_for_offset which adds support for creating a single- level miptree based on the existing offsets and dimensions of another mip-tree level. Use this function as well in intel_miptree_create_for_region, but for the whole region. Signed-off-by: Abdiel Janulgue abdiel.janul

[Mesa-dev] [PATCH 3/6] intel: add new miptree helper functions

2013-01-02 Thread Abdiel Janulgue
Expose intel_miptree_copy_slice and add function calculating x and y offsets of a miptree level within a tiled region. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 17 - src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH 4/6] i965: Account for offsets when emitting SURFACE_STATE.

2013-01-02 Thread Abdiel Janulgue
If the offsets are present, this lets us specify a particular level and slice in a shared region using the base level of an exported mip-map tree. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 +++- src/mesa

[Mesa-dev] [PATCH 5/6] intel: implement create image from texture

2013-01-02 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_screen.c | 181 + 1 file changed, 161 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index

[Mesa-dev] [PATCH 6/6] intel: Create a miptree using offsets in intel_set_texture_image_region

2013-01-02 Thread Abdiel Janulgue
When binding a region to a texture image, re-create the miptree base-level considering the offset and dimension information exported by DRIImage. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_image.c | 27 -- 1

Re: [Mesa-dev] [RFC] intel: add support for EGL_KHR_gl_image

2013-01-07 Thread Abdiel Janulgue
On Thursday, January 03, 2013 05:00:39 PM Eric Anholt wrote: Sorry for the delay, I think we all disappeared over the holidays. Let's see if I've got this all right. It looks like today we have extensions for: OES_EGL_image: * turn an EGLImage into a 0-level texture * turn an EGLImage

[Mesa-dev] intel: EGL_KHR_gl_image v3

2013-01-11 Thread Abdiel Janulgue
v3 here. Hopefully I've addressed the issues. In this revision, we now report GL_INVALID_OPERATION when we can't resolve back to specific offsets within a shared region. For non-tile-aligned HW, this means that only base-levels of textures can be exported. I've also found and fixed an error in

[Mesa-dev] [PATCH v3 1/6] dri2: Create image from texture

2013-01-11 Thread Abdiel Janulgue
Add create image from texture extension and bump version. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- include/GL/internal/dri_interface.h | 14 +- src/egl/drivers/dri2/egl_dri2.c | 83 +++ 2 files changed, 96 insertions(+), 1

[Mesa-dev] [PATCH v3 3/6] intel: add new miptree helper functions

2013-01-11 Thread Abdiel Janulgue
Expose intel_miptree_copy_slice and add function calculating x and y offsets of a miptree level within a tiled region. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 17 - src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH v3 2/6] intel: create a miptree for a region based on an offset, size, and level.

2013-01-11 Thread Abdiel Janulgue
Add intel_miptree_create_for_offset which adds support for creating a single- level miptree based on the existing offsets and dimensions of another mip-tree level. Use this function as well in intel_miptree_create_for_region, but for the whole region. Signed-off-by: Abdiel Janulgue abdiel.janul

[Mesa-dev] [PATCH v3 5/6] intel: implement create image from texture

2013-01-11 Thread Abdiel Janulgue
Save miptree level info to DRIImage, taking offsets into consideration. In non-tile-aligned surface cases where resolving back to the original image proves problematic due to alignment issues, report INVALID_OPERATION as per spec wording. Signed-off-by: Abdiel Janulgue abdiel.janul

[Mesa-dev] [PATCH v3 4/6] i965: Account for offsets when emitting SURFACE_STATE.

2013-01-11 Thread Abdiel Janulgue
If the offsets are present, this lets us specify a particular level and slice in a shared region using the base level of an exported mip-map tree. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 +++- src/mesa

[Mesa-dev] [PATCH v3 6/6] intel: Create a miptree using offsets in intel_set_texture_image_region

2013-01-11 Thread Abdiel Janulgue
When binding a region to a texture image, re-create the miptree base-level considering the offset and dimension information exported by DRIImage. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_image.c | 27 -- 1

Re: [Mesa-dev] intel: EGL_KHR_gl_image v3

2013-01-11 Thread Abdiel Janulgue
On Friday, January 11, 2013 04:27:23 PM Abdiel Janulgue wrote: v3 here. Hopefully I've addressed the issues. patch series lives on git://gitorious.org/mesa3d/mesa.git KHR_gl_image3 branch In this revision, we now report GL_INVALID_OPERATION when we can't resolve back to specific offsets

[Mesa-dev] intel: add support for EGL_KHR_gl_image (V4)

2013-01-14 Thread Abdiel Janulgue
Changes from v3: - Unexport intel_miptree_copy_slice. We don't need fake storage anymore for non-tile aligned surfaces. - Fix error in gen6 caught by piglit test for this extension. This is another case where I forgot to consider the miptree slices; this time in updating SURFACE_STATE. --

[Mesa-dev] [PATCH V4 1/6] dri2: Create image from texture

2013-01-14 Thread Abdiel Janulgue
Add create image from texture extension and bump version. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- include/GL/internal/dri_interface.h | 14 +- src/egl/drivers/dri2/egl_dri2.c | 83 +++ 2 files changed, 96 insertions(+), 1

[Mesa-dev] [PATCH V4 3/6] intel: add new miptree helper functions

2013-01-14 Thread Abdiel Janulgue
Add helper to calculate x and y offsets of a miptree level within a tiled region. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 15 +++ src/mesa/drivers/dri/intel/intel_mipmap_tree.h |6 ++ 2 files

[Mesa-dev] [PATCH V4 2/6] intel: create a miptree for a region based on an offset, size, and level.

2013-01-14 Thread Abdiel Janulgue
Add intel_miptree_create_for_offset which adds support for creating a single- level miptree based on the existing offsets and dimensions of another mip-tree level. Use this function as well in intel_miptree_create_for_region, but for the whole region. Signed-off-by: Abdiel Janulgue abdiel.janul

[Mesa-dev] [PATCH V4 4/6] i965: Account for offsets when updating SURFACE_STATE.

2013-01-14 Thread Abdiel Janulgue
If the offsets are present, this lets us specify a particular level and slice in a shared region using the base level of an exported mip-map tree. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 +++- src/mesa

[Mesa-dev] [PATCH V4 5/6] intel: implement create image from texture

2013-01-14 Thread Abdiel Janulgue
. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_screen.c | 178 + 1 file changed, 158 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c

[Mesa-dev] [PATCH V4 6/6] intel: Create a miptree using offsets in intel_set_texture_image_region

2013-01-14 Thread Abdiel Janulgue
When binding a region to a texture image, re-create the miptree base-level considering the offset and dimension information exported by DRIImage. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_image.c | 27 -- 1

Re: [Mesa-dev] [PATCH V4 5/6] intel: implement create image from texture

2013-01-16 Thread Abdiel Janulgue
On Tuesday, January 15, 2013 02:05:00 PM Eric Anholt wrote: +static void +intel_image_set_level_info(__DRIimage *image, struct intel_mipmap_tree *mt, + int level, int slice, + uint32_t mask_x, uint32_t mask_y) +{ + image-width =

[Mesa-dev] [PATCH V5 0/7]intel: add support for EGL_KHR_gl_image

2013-01-17 Thread Abdiel Janulgue
Changes since v4: * Drop texture 3D support for now (until we test it with piglit). I plan to add it incrementally as soon as piglit tests for it are done. * Drop useless errors warnings and report proper EGL errors. * Expose intel_miptree_create_internal as intel_miptree_create_layout *

[Mesa-dev] [PATCH V5 2/7] intel: expose dimensions and offsets of a miptree level in DRIImage

2013-01-17 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_regions.h |7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h index 8737a6d..95b65de 100644

[Mesa-dev] [PATCH V5 1/7] dri2: Create image from texture

2013-01-17 Thread Abdiel Janulgue
Add create image from texture extension and bump version. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- include/GL/internal/dri_interface.h | 14 +- src/egl/drivers/dri2/egl_dri2.c | 85 +++ 2 files changed, 98 insertions(+), 1

[Mesa-dev] [PATCH V5 3/7] intel: Expose intel_miptree_create_internal as intel_miptree_create_layout.

2013-01-17 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 37 src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 14 - 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers/dri

[Mesa-dev] [PATCH V5 4/7] intel: add pixel offset calculator for miptree levels

2013-01-17 Thread Abdiel Janulgue
Add helper to calculate fine-grained x and y adjustment pixels to an image within a miptree level for tiled regions. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 15 +++ src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH V5 7/7] intel: implement create image from texture

2013-01-17 Thread Abdiel Janulgue
alignment issues, report INVALID_OPERATION as per spec wording. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_screen.c | 186 + 1 file changed, 166 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers/dri

[Mesa-dev] [PATCH V5 5/7] i965: Account for offsets when updating SURFACE_STATE.

2013-01-17 Thread Abdiel Janulgue
If the offsets are present, this lets us specify a particular level and slice in a shared region using the base level of an exported mip-map tree. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 +++- src/mesa

[Mesa-dev] [PATCH V5 6/7] intel: Create a miptree using offsets in intel_set_texture_image_region

2013-01-17 Thread Abdiel Janulgue
When binding a region to a texture image, re-create the miptree base-level considering the offset and dimension information exported by DRIImage. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_image.c | 31 -- 1

[Mesa-dev] Fix a crash in update_texture_state() when requesting a fallback for external texture target

2012-10-10 Thread Abdiel Janulgue
I found a crash where updating the texture unit states ends up requesting a fallback texture for a GL_TEXTURE_EXTERNAL_OES target and sets a null current texture object for the current unit. This is a fix by supporting TEXTURE_EXTERNAL_INDEX target in _mesa_get_fallback_texture() and making

Re: [Mesa-dev] Fix a crash in update_texture_state() when requesting a fallback for external texture target

2012-10-12 Thread Abdiel Janulgue
mesa: Fix a crash in update_texture_state() when requesting a fallback for an external texture target. NOTE: This is a candidate for the stable branch. Signed-off-by: Abdiel abdiel.janul...@intel.com diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index

[Mesa-dev] [PATCH] i965/gen7.5: Fix missing Shader Channel Select entries on Haswell

2013-09-20 Thread Abdiel Janulgue
Probably non-intentional, but the SURFACE_STATE setup refactoring for buffer surfaces had missed the scs bits when creating constant surface states. Fixes broken GLB 2.5 on Haswell where the knight's textures are missing Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src

Re: [Mesa-dev] [PATCH] i965/blorp: retype destination register for texture SEND instruction to UW.

2013-09-30 Thread Abdiel Janulgue
I re-ran piglit with my resource streamer v2 implementation + this patch and actually this fixed sporadic lockups that I've been struggling with. As discussed at F2F with Chad and Paul, we need this for RS. I'll be posting the RS v2 soon quite soon. -abdiel On Friday, September 27, 2013

[Mesa-dev] RFC: Haswell resource streamer/hw-generated binding tables (v2)

2013-10-08 Thread Abdiel Janulgue
Prerequisites: - Kernel patches: [1] (do 'make headers_install' and update libdrm headers after compiling the kernel) - Mesa patch: [2] This is an update from my previous RFC patches [3]. Most notable change is that the resource streamer is an experimental feature disabled by

[Mesa-dev] [PATCH 01/16] i965/gen7.5: Implement resource streamer control opcodes

2013-10-08 Thread Abdiel Janulgue
Used to toggle the resource streamer within a batchbuffer Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/intel_reg.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_reg.h b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 02/16] i965/gen7.5: Introduce INTEL_RESOURCE_STREAMER to toggle resource streamer

2013-10-08 Thread Abdiel Janulgue
export INTEL_RESOURCE_STREAMER={0,1} To switch on/off resource streamer. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_context.h |1 + src/mesa/drivers/dri/i965/intel_context.c | 24 2 files changed, 25

[Mesa-dev] [PATCH 03/16] i965/gen7.5: Pass resource streamer enable flags on batchbuffer start

2013-10-08 Thread Abdiel Janulgue
This is passed on the kernel to enable the resource streamer enable bit on MI_BATCHBUFFER_START Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/intel_batchbuffer.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH 04/16] i965/gen7.5: Temporarily disable resource streamer when updating state base address.

2013-10-08 Thread Abdiel Janulgue
Bspec: Prior to changing the Surface State Base Address, the resouce streamer must be disabled within a batch buffer where the RS is enabled. RS is re-enabled again once the SBA is updated. The resource streamer can be toggled within a batch using MI_RS_CONTROL. Signed-off-by: Abdiel Janulgue

[Mesa-dev] [PATCH 05/16] i965/gen7.5: Implement MI_RS_STORE_DATA_IMM workaround for 3DPRIMITIVE commands

2013-10-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_draw.c | 14 ++ src/mesa/drivers/dri/i965/gen7_blorp.cpp | 14 ++ 2 files changed, 28 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa

[Mesa-dev] [PATCH 07/16] i965/gen7.5: Enable hardware-generated binding tables in blorp path

2013-10-08 Thread Abdiel Janulgue
--- src/mesa/drivers/dri/i965/gen7_blorp.cpp |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp index 4d1a65e..031e21e 100644 --- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp +++

[Mesa-dev] [PATCH 06/16] i965/gen7.5: Enable hardware-generated binding tables on render path.

2013-10-08 Thread Abdiel Janulgue
. In addition, this change inserts the required brw_tracked_state objects to enable hw-generated binding tables in normal render path. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_binding_tables.c | 84 src/mesa/drivers

[Mesa-dev] [PATCH 10/16] i965/gen7.5: Update surface state entries in update_texture_surfaces

2013-10-08 Thread Abdiel Janulgue
Update the on-chip binding table for every generated texture surface_state entries. Instead of generating binding tables manually, we update individual slots of surface state entries using the new EDIT commands for gen7.5 Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src

[Mesa-dev] [PATCH 08/16] i965/gen7.5: Skip manual binding table upload

2013-10-08 Thread Abdiel Janulgue
When hardware-generated binding tables are taken into use, skip uploading of binding tables generated manually by the driver. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_binding_tables.c | 12 ++-- 1 file changed, 10 insertions(+), 2

[Mesa-dev] [PATCH 09/16] i965/gen7.5: Implement opcodes for the hw-generated binding table EDIT commands

2013-10-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_binding_tables.c | 36 src/mesa/drivers/dri/i965/brw_defines.h|5 src/mesa/drivers/dri/i965/brw_state.h | 15 +- 3 files changed, 55

[Mesa-dev] [PATCH 11/16] i965/gen7.5: Update surface entries for pull constants and VS UBO surfaces.

2013-10-08 Thread Abdiel Janulgue
When surface_state pointing to pull constant surfaces are changed, update on-chip binding table. Same with VS ubo surface states. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_vs_surface_state.c |9 + 1 file changed, 9 insertions

[Mesa-dev] [PATCH 12/16] i965/gen7.5: Update surface state entries for renderbuffer surfaces

2013-10-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 13/16] i965/gen7.5: Update surface state entries for WM UBO surface states

2013-10-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index d82a7cf

[Mesa-dev] [PATCH 14/16] i965/gen7.5: Update surface state entry for WM pull constants

2013-10-08 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 08c5720

[Mesa-dev] [PATCH 15/16] i965/blorp: Update surface state entries in blorp.

2013-10-08 Thread Abdiel Janulgue
When hw-generated binding tables are enabled edit the binding table state for new SURFACE_STATE entries that are generated in the blorp path. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/gen6_blorp.cpp | 15 ++- 1 file changed, 14

[Mesa-dev] [PATCH 16/16] i965/gen7.5: Flush on-chip binding table to pool

2013-10-08 Thread Abdiel Janulgue
entry within the command only allows until 32k. Therefore, ensure that offset fits within the highest bit of the command. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/gen7_blorp.cpp |4 +++- src/mesa/drivers/dri/i965/gen7_vs_state.c |3

Re: [Mesa-dev] RFC: Haswell resource streamer/hw-generated binding tables (v2)

2013-10-08 Thread Abdiel Janulgue
On Wednesday, October 09, 2013 12:41:37 AM Abdiel Janulgue wrote: Prerequisites: - Kernel patches: [1] (do 'make headers_install' and update libdrm headers after compiling the kernel) - Mesa patch: [2] Series lives on http://cgit.freedesktop.org/~abj/mesa/ mesa_rs branch

[Mesa-dev] [PATCH 03/16] i965/gen7.5: Pass resource streamer enable flags on batchbuffer start

2013-10-10 Thread Abdiel Janulgue
: Eric Anholt e...@anholt.net Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/intel_batchbuffer.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 06/16] i965/gen7.5: Enable hardware-generated binding tables on render path.

2013-10-10 Thread Abdiel Janulgue
implementation failed to catch this flags. Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_binding_tables.c | 87 src/mesa/drivers/dri/i965/brw_context.c|1 + src/mesa/drivers/dri/i965/brw_context.h|1

  1   2   3   4   5   >