platform/upstream/Vulkan-LoaderAndValidationLayers.git
10 years agointel: rework cmd buffer management
Chia-I Wu [Tue, 9 Sep 2014 02:32:59 +0000 (10:32 +0800)]
intel: rework cmd buffer management

Hopefully the new code is easier to follow and more robust.

10 years agointel: rename ptr_opaque to ptr
Chia-I Wu [Tue, 9 Sep 2014 02:25:46 +0000 (10:25 +0800)]
intel: rename ptr_opaque to ptr

It is void * and is opqaue already.

10 years agointel: make cmd writers an array
Chia-I Wu [Tue, 9 Sep 2014 01:43:21 +0000 (09:43 +0800)]
intel: make cmd writers an array

Replace batch, state, and kernel writers by an array of writers.

10 years agointel: improve XGL_PIPELINE_IA_STATE_CREATE_INFO handling
Chia-I Wu [Tue, 2 Sep 2014 05:20:59 +0000 (13:20 +0800)]
intel: improve XGL_PIPELINE_IA_STATE_CREATE_INFO handling

Make intel_pipeline smaller, and handle disableVertexReuse and
XGL_TOPOLOGY_PATCH.

10 years agointel: remove urb_read_length and max_*_threads
Chia-I Wu [Tue, 2 Sep 2014 05:27:48 +0000 (13:27 +0800)]
intel: remove urb_read_length and max_*_threads

Effectively revert 39e0021034175dd982ddce3764280b44e4545968 and
073e83cebec17d1774675960306be4022b2a4136, and redo
3d72e8ca3660ab372a27a7662db7d47b48fb6817

10 years agointel: really rename pipeline_rmap.c to pipeline_shader.c
Chia-I Wu [Tue, 2 Sep 2014 05:11:32 +0000 (13:11 +0800)]
intel: really rename pipeline_rmap.c to pipeline_shader.c

This commit was lost when I switched from an internal repo to github.

10 years agointel: rename rmap to pipeline rmap
Chia-I Wu [Tue, 2 Sep 2014 04:07:28 +0000 (12:07 +0800)]
intel: rename rmap to pipeline rmap

For consistency.

10 years agointel: shorten shader stage names
Chia-I Wu [Tue, 2 Sep 2014 03:01:03 +0000 (11:01 +0800)]
intel: shorten shader stage names

Use tcs, tes, and cs for tess control, tess eval, and compute.

10 years agointel: rename intel_pipe_shader to intel_pipeline_shader
Chia-I Wu [Tue, 2 Sep 2014 00:52:27 +0000 (08:52 +0800)]
intel: rename intel_pipe_shader to intel_pipeline_shader

It is initialized from XGL_PIPELINE_SHADER, and we already use intel_pipeline
for XGL_PIPELINE.

10 years agointel: intel_pipeline should not have XGL_PIPELINE_SHADER
Chia-I Wu [Tue, 2 Sep 2014 02:53:20 +0000 (10:53 +0800)]
intel: intel_pipeline should not have XGL_PIPELINE_SHADER

They may have a shorter lifespan.

10 years agointel: clean up pipeline shader building a bit
Chia-I Wu [Tue, 2 Sep 2014 02:03:19 +0000 (10:03 +0800)]
intel: clean up pipeline shader building a bit

10 years agointel: make all rmap functions static
Chia-I Wu [Tue, 2 Sep 2014 02:21:34 +0000 (10:21 +0800)]
intel: make all rmap functions static

10 years agointel: move shader building/tearing to pipeline_shader.c
Chia-I Wu [Tue, 2 Sep 2014 01:42:46 +0000 (09:42 +0800)]
intel: move shader building/tearing to pipeline_shader.c

10 years agointel: cs is a part of XGL_COMPUTE_PIPELINE_CREATE_INFO
Chia-I Wu [Tue, 2 Sep 2014 02:06:12 +0000 (10:06 +0800)]
intel: cs is a part of XGL_COMPUTE_PIPELINE_CREATE_INFO

We probably want to separate graphics and compute pipeline create info at some
point.

10 years agointel: remove gpu from intel_pipeline_create_info
Chia-I Wu [Tue, 2 Sep 2014 02:24:05 +0000 (10:24 +0800)]
intel: remove gpu from intel_pipeline_create_info

Make it flattened XGL_GRAPHICS_PIPELINE_CREATE_INFO proper.

10 years agointel: rename pipeline builder to pipeline create info
Chia-I Wu [Tue, 2 Sep 2014 01:32:46 +0000 (09:32 +0800)]
intel: rename pipeline builder to pipeline create info

It is flattened XGL_GRAPHICS_PIPELINE_CREATE_INFO after all.

10 years agoRevert "intel: rename intel_pipe_shader to intel_pipeline_shader"
Chia-I Wu [Tue, 2 Sep 2014 05:06:11 +0000 (13:06 +0800)]
Revert "intel: rename intel_pipe_shader to intel_pipeline_shader"

This reverts commit e47bf243b60c7195736ff86627a9f2a21d0e8104.  Wrong branch
pushed.

10 years agoRevert "intel: rename pipeline_rmap.c to pipeline_shader.c"
Chia-I Wu [Tue, 2 Sep 2014 05:05:27 +0000 (13:05 +0800)]
Revert "intel: rename pipeline_rmap.c to pipeline_shader.c"

This reverts commit 89de5d0c16558454f3f2f5f24fb096574845bb82.  Wrong branch
pushed.

10 years agointel: rename pipeline_rmap.c to pipeline_shader.c
Chia-I Wu [Tue, 2 Sep 2014 01:15:35 +0000 (09:15 +0800)]
intel: rename pipeline_rmap.c to pipeline_shader.c

10 years agointel: rename intel_pipe_shader to intel_pipeline_shader
Chia-I Wu [Tue, 2 Sep 2014 00:52:27 +0000 (08:52 +0800)]
intel: rename intel_pipe_shader to intel_pipeline_shader

It is initialized from XGL_PIPELINE_SHADER, and we already use intel_pipeline
for XGL_PIPELINE.

10 years agointel: remove unused pipeline defines
Chia-I Wu [Tue, 2 Sep 2014 00:50:14 +0000 (08:50 +0800)]
intel: remove unused pipeline defines

10 years agoupdate copyright information
Chia-I Wu [Tue, 2 Sep 2014 00:32:09 +0000 (08:32 +0800)]
update copyright information

To my best knowledge.

10 years agoxgl: Add build instructions
Courtney Goeltzenleuchter [Tue, 2 Sep 2014 00:05:45 +0000 (18:05 -0600)]
xgl: Add build instructions

10 years agoxgl: Add project readme
Courtney Goeltzenleuchter [Mon, 1 Sep 2014 23:18:57 +0000 (17:18 -0600)]
xgl: Add project readme

10 years agotests: clean up use of Image object to fix SEGV
Courtney Goeltzenleuchter [Mon, 1 Sep 2014 23:56:16 +0000 (17:56 -0600)]
tests: clean up use of Image object to fix SEGV

10 years agotests: Convert render_test to use XglImage class
Courtney Goeltzenleuchter [Mon, 1 Sep 2014 22:37:18 +0000 (16:37 -0600)]
tests: Convert render_test to use XglImage class

10 years agotests: Add CreateImage method to Device class
Courtney Goeltzenleuchter [Mon, 1 Sep 2014 22:36:49 +0000 (16:36 -0600)]
tests: Add CreateImage method to Device class

10 years agotests: Add image class
Courtney Goeltzenleuchter [Mon, 1 Sep 2014 22:35:58 +0000 (16:35 -0600)]
tests: Add image class

Add class that test can use to manipulate images in XGL.

10 years agotests: Use full include path for gtest
Courtney Goeltzenleuchter [Mon, 1 Sep 2014 22:33:55 +0000 (16:33 -0600)]
tests: Use full include path for gtest

For some reason, QtCreator doesn't like the include "gtest/gtest.h"
it just won't do symbol lookup.

10 years agorender_test: Add OpenGL display engine
Courtney Goeltzenleuchter [Mon, 1 Sep 2014 19:57:15 +0000 (13:57 -0600)]
render_test: Add OpenGL display engine

10 years agotests: Add simple OpenGL helper to display XGL images
Courtney Goeltzenleuchter [Mon, 1 Sep 2014 19:56:09 +0000 (13:56 -0600)]
tests: Add simple OpenGL helper to display XGL images

10 years agointel: Now emit 3DSTATE_VS command
Courtney Goeltzenleuchter [Fri, 29 Aug 2014 22:27:47 +0000 (16:27 -0600)]
intel: Now emit 3DSTATE_VS command

10 years agointel: copy shader state to shader_pipeline for safe keeping
Courtney Goeltzenleuchter [Fri, 29 Aug 2014 22:25:30 +0000 (16:25 -0600)]
intel: copy shader state to shader_pipeline for safe keeping

Need to copy shader information into intel_pipe_shader
as the original shader object may be destroyed by the app.

10 years agointel: Add shader resource urb_read_offset
Courtney Goeltzenleuchter [Fri, 29 Aug 2014 22:23:22 +0000 (16:23 -0600)]
intel: Add shader resource urb_read_offset

The urb_read_offset is used by 3DSTATE_VS.
Right now just set it to "safe" default value.

10 years agointel: Add platform gpu thread limits
Courtney Goeltzenleuchter [Fri, 29 Aug 2014 22:21:22 +0000 (16:21 -0600)]
intel: Add platform gpu thread limits

Set max number of threads for Sandybridge, Ivybridge and Haswell
and their various gt configurations.

10 years agoadd a top-level .gitignore
Chia-I Wu [Mon, 1 Sep 2014 01:27:08 +0000 (09:27 +0800)]
add a top-level .gitignore

10 years agointel: remove more unused fields from intel_pipeline
Chia-I Wu [Sun, 31 Aug 2014 05:43:12 +0000 (13:43 +0800)]
intel: remove more unused fields from intel_pipeline

10 years agointel: implement intelCmd*{Event,Timestamp}()
Chia-I Wu [Sun, 31 Aug 2014 04:58:35 +0000 (12:58 +0800)]
intel: implement intelCmd*{Event,Timestamp}()

According to the kernel (not the PRMs), MI_STORE_REGISTER_MEM should be able
to read 64-bits once.  Need to confirm and rely on that.

10 years agointel: rename cmd_query.c to cmd_mi.c
Chia-I Wu [Sun, 31 Aug 2014 04:58:56 +0000 (12:58 +0800)]
intel: rename cmd_query.c to cmd_mi.c

For commands that use MI_*, such as queries, timestamp, and etc.

10 years agointel: add helpers for GEN6_PIPE_CONTROL_WRITE_*
Chia-I Wu [Sun, 31 Aug 2014 05:15:58 +0000 (13:15 +0800)]
intel: add helpers for GEN6_PIPE_CONTROL_WRITE_*

10 years agointel: extend gen6_PIPE_CONTROL()
Chia-I Wu [Sun, 31 Aug 2014 05:14:21 +0000 (13:14 +0800)]
intel: extend gen6_PIPE_CONTROL()

To enable GEN6_PIPE_CONTROL_WRITE_IMM.

10 years agointel: implement intelGetMultiGpuCompatibility()
Chia-I Wu [Sun, 31 Aug 2014 04:39:05 +0000 (12:39 +0800)]
intel: implement intelGetMultiGpuCompatibility()

Based on imagining two physical Intel CPUs in a single system.

10 years agointel: limit INTEL_RELOC_GGTT to GEN6
Chia-I Wu [Sun, 31 Aug 2014 04:28:38 +0000 (12:28 +0800)]
intel: limit INTEL_RELOC_GGTT to GEN6

Only need it on GEN6.

10 years agointel: fix max entries of 3DSTATE_URB_VS on Haswell GT2+
Chia-I Wu [Sun, 31 Aug 2014 04:26:39 +0000 (12:26 +0800)]
intel: fix max entries of 3DSTATE_URB_VS on Haswell GT2+

10 years agorender_tests: use built-in kernels
Chia-I Wu [Sat, 30 Aug 2014 06:03:32 +0000 (14:03 +0800)]
render_tests: use built-in kernels

They are commentted.

10 years agorender_tests: no culling
Chia-I Wu [Sat, 30 Aug 2014 16:52:42 +0000 (00:52 +0800)]
render_tests: no culling

10 years agointel: set urb_grf_start for our magic shaders
Chia-I Wu [Sat, 30 Aug 2014 16:35:27 +0000 (00:35 +0800)]
intel: set urb_grf_start for our magic shaders

10 years agorender_tests: query and test XGL_PIPELINE_STATISTICS_DATA
Chia-I Wu [Sat, 30 Aug 2014 15:58:36 +0000 (23:58 +0800)]
render_tests: query and test XGL_PIPELINE_STATISTICS_DATA

10 years agorender_tests: add functions to create query pools
Chia-I Wu [Sat, 30 Aug 2014 15:53:01 +0000 (23:53 +0800)]
render_tests: add functions to create query pools

10 years agointel: fix pipeline stats querying
Chia-I Wu [Sat, 30 Aug 2014 16:06:36 +0000 (00:06 +0800)]
intel: fix pipeline stats querying

10 years agointel: implement intelCmd*Query()
Chia-I Wu [Sat, 30 Aug 2014 10:44:47 +0000 (18:44 +0800)]
intel: implement intelCmd*Query()

10 years agointel: careful with the flags in cmd_batch_flush()
Chia-I Wu [Sat, 30 Aug 2014 11:05:30 +0000 (19:05 +0800)]
intel: careful with the flags in cmd_batch_flush()

The same comment appears three times.  Need refactoring.

10 years agointel: include obj.h in mem.h
Chia-I Wu [Sat, 30 Aug 2014 10:55:54 +0000 (18:55 +0800)]
intel: include obj.h in mem.h

For intel_base.

10 years agointel: fix CLIP_VIEWPORT
Chia-I Wu [Sat, 30 Aug 2014 10:23:55 +0000 (18:23 +0800)]
intel: fix CLIP_VIEWPORT

Floats were converted to integers.

10 years agointel: honor image tiling request
Chia-I Wu [Sat, 30 Aug 2014 10:23:28 +0000 (18:23 +0800)]
intel: honor image tiling request

10 years agointel: correct non-MSAA sample position
Chia-I Wu [Sat, 30 Aug 2014 07:28:35 +0000 (15:28 +0800)]
intel: correct non-MSAA sample position

10 years agointel: emit 3DSTATE_CLIP
Chia-I Wu [Sat, 30 Aug 2014 06:29:29 +0000 (14:29 +0800)]
intel: emit 3DSTATE_CLIP

10 years agointel: export viewport count in intel_viewport_state
Chia-I Wu [Sat, 30 Aug 2014 06:29:15 +0000 (14:29 +0800)]
intel: export viewport count in intel_viewport_state

10 years agointel: emit 3DSTATE_SF and 3DSTATE_SBE
Chia-I Wu [Fri, 29 Aug 2014 10:31:32 +0000 (18:31 +0800)]
intel: emit 3DSTATE_SF and 3DSTATE_SBE

It looks like 3DSTATE_SBE could be moved to PSO.

10 years agointel: vs output count should be 2
Chia-I Wu [Fri, 29 Aug 2014 12:02:06 +0000 (20:02 +0800)]
intel: vs output count should be 2

VUE header and position.

10 years agointel: add 3DSTATE_VERTEX_ELEMENTS to INTEL_PSO_CMD_ENTRIES
Chia-I Wu [Fri, 29 Aug 2014 07:40:39 +0000 (15:40 +0800)]
intel: add 3DSTATE_VERTEX_ELEMENTS to INTEL_PSO_CMD_ENTRIES

10 years agointel: emit 3DSTATE_WM and 3DSTATE_PS
Chia-I Wu [Fri, 29 Aug 2014 07:07:09 +0000 (15:07 +0800)]
intel: emit 3DSTATE_WM and 3DSTATE_PS

10 years agointel: export more shader info
Chia-I Wu [Fri, 29 Aug 2014 07:07:19 +0000 (15:07 +0800)]
intel: export more shader info

Needed for 3DSTATE_WM and 3DSTATE_PS.

10 years agointel: add sample_count to intel_msaa_state
Chia-I Wu [Fri, 29 Aug 2014 07:03:28 +0000 (15:03 +0800)]
intel: add sample_count to intel_msaa_state

10 years agointel: reserve space for PSO
Chia-I Wu [Fri, 29 Aug 2014 06:54:54 +0000 (14:54 +0800)]
intel: reserve space for PSO

10 years agointel: emit 3DSTATE_VERTEX_ELEMENT
Chia-I Wu [Fri, 29 Aug 2014 06:20:36 +0000 (14:20 +0800)]
intel: emit 3DSTATE_VERTEX_ELEMENT

10 years agointel: set unused states to zero
Chia-I Wu [Fri, 29 Aug 2014 06:06:35 +0000 (14:06 +0800)]
intel: set unused states to zero

Set unused BINDING_TABLE and SAMPLER_STATE pointers to zero.  Not sure if this
is necessary.

10 years agointel: document the commands in PSO
Chia-I Wu [Fri, 29 Aug 2014 06:01:16 +0000 (14:01 +0800)]
intel: document the commands in PSO

10 years agointel: give WAs some sanity
Chia-I Wu [Fri, 29 Aug 2014 04:28:37 +0000 (12:28 +0800)]
intel: give WAs some sanity

Give WAs descriptive names and document them in cmd.h.

As a future improvement, when

 INTEL_CMD_WA_GEN7_POST_COMMAND_CS_STALL
 INTEL_CMD_WA_GEN7_POST_COMMAND_DEPTH_STALL

are both set, it is possible to combine them into a PIPE_CONTROL.

10 years agointel: gen7_3DSTATE_GS is GEN7+ only
Chia-I Wu [Fri, 29 Aug 2014 04:07:47 +0000 (12:07 +0800)]
intel: gen7_3DSTATE_GS is GEN7+ only

10 years agointel: remove unused members in intel_pipe_shader
Chia-I Wu [Fri, 29 Aug 2014 03:31:16 +0000 (11:31 +0800)]
intel: remove unused members in intel_pipe_shader

This reverts 650983f049d782449b3b693da9eb5761c25dcb47 and more effectively.

The plan seems to be to emit 3DSTATE_GS and the like from cmd_pipeline.c,
without PSO doing any work.  Then intel_shader_cso should not exist, because
its purpose is for PSO to have partially initialized 3DSTATE_GS and
etc.

gen7_emit_3DSTATE_GS() is actually doing nothing because it uses
intel_shader_cso and nobody sets up intel_shader_cso.  Make it clear it does
nothing.

10 years agointel: allow INTEL_DEBUG to override device ID
Chia-I Wu [Fri, 29 Aug 2014 04:01:13 +0000 (12:01 +0800)]
intel: allow INTEL_DEBUG to override device ID

INTEL_DEBUG=0x<DEVID> overrides the device id to <DEVID>.  It implies
INTEL_DEBUG=nohw for security reasons.

10 years agointel: remove PCB and binding table pointer setup from PSO
Chia-I Wu [Fri, 29 Aug 2014 02:01:51 +0000 (10:01 +0800)]
intel: remove PCB and binding table pointer setup from PSO

Broken code, wrong place.

10 years agointel: fix assertion failures on Haswell
Chia-I Wu [Fri, 29 Aug 2014 02:26:14 +0000 (10:26 +0800)]
intel: fix assertion failures on Haswell

10 years agoicd: remove generated icd-dispatch-table.h
Chia-I Wu [Fri, 29 Aug 2014 01:15:43 +0000 (09:15 +0800)]
icd: remove generated icd-dispatch-table.h

Added by accident in 814cd2969bc42056edebd733f55f06ebf1d2358f.

10 years agointel: Add DS, TE and HS commands
Courtney Goeltzenleuchter [Fri, 29 Aug 2014 00:05:24 +0000 (18:05 -0600)]
intel: Add DS, TE and HS commands

10 years agointel: Emit GS state
Courtney Goeltzenleuchter [Thu, 28 Aug 2014 23:44:53 +0000 (17:44 -0600)]
intel: Emit GS state

10 years agointel: Add const_alloc state to pipeline
Courtney Goeltzenleuchter [Thu, 28 Aug 2014 23:44:05 +0000 (17:44 -0600)]
intel: Add const_alloc state to pipeline

10 years agointel: Add shader fields needed by pipeline.
Courtney Goeltzenleuchter [Thu, 28 Aug 2014 23:38:54 +0000 (17:38 -0600)]
intel: Add shader fields needed by pipeline.

10 years agointel: Add more platform limits for shader structs
Courtney Goeltzenleuchter [Thu, 28 Aug 2014 23:38:09 +0000 (17:38 -0600)]
intel: Add more platform limits for shader structs

10 years agointel: Set WA flags needed for pipeline state
Courtney Goeltzenleuchter [Thu, 28 Aug 2014 23:35:03 +0000 (17:35 -0600)]
intel: Set WA flags needed for pipeline state

10 years agointel: remove unused elements
Courtney Goeltzenleuchter [Thu, 28 Aug 2014 23:31:04 +0000 (17:31 -0600)]
intel: remove unused elements

10 years agointel: track current cmd buffer shader info
Courtney Goeltzenleuchter [Thu, 28 Aug 2014 23:27:47 +0000 (17:27 -0600)]
intel: track current cmd buffer shader info

Added intel_cmd_shader structs for each of the shader types
so that we know the offsets to each shader kernel.

10 years agointel: Move WA flags to pipeline.h
Courtney Goeltzenleuchter [Thu, 28 Aug 2014 23:21:30 +0000 (17:21 -0600)]
intel: Move WA flags to pipeline.h

The pipeline now flags what workarounds needed to be emitted
just before and just after the pipeline state is transferred
to the command buffer BO.

10 years agointel: Use single PSO command buffer
Courtney Goeltzenleuchter [Thu, 28 Aug 2014 19:16:27 +0000 (13:16 -0600)]
intel: Use single PSO command buffer

10 years agointel: emit 3DSTATE_URB_*
Chia-I Wu [Thu, 28 Aug 2014 15:15:48 +0000 (23:15 +0800)]
intel: emit 3DSTATE_URB_*

The commands are stored in pipeline->cmd_urb_alloc at pipeline creation time,
and copied to intel_cmd when the pipeline is bound.  Once our pipeline is more
complete, we will decide if we want multiple pipeline->cmd_*, or a single
pipeline->cmd.

10 years agointel: export GT in intel_gpu
Chia-I Wu [Thu, 28 Aug 2014 15:27:10 +0000 (23:27 +0800)]
intel: export GT in intel_gpu

10 years agointel: reject other GENS when INTEL_GEN_SPECIALIZED is defined
Chia-I Wu [Thu, 28 Aug 2014 15:23:33 +0000 (23:23 +0800)]
intel: reject other GENS when INTEL_GEN_SPECIALIZED is defined

10 years agointel: remove some unused fields from intel_pipeline
Chia-I Wu [Thu, 28 Aug 2014 07:42:36 +0000 (15:42 +0800)]
intel: remove some unused fields from intel_pipeline

10 years agointel: pCode is not a intel_shader
Chia-I Wu [Thu, 28 Aug 2014 07:36:44 +0000 (15:36 +0800)]
intel: pCode is not a intel_shader

10 years agointel: refactor intelCreateGraphicsPipeline()
Chia-I Wu [Thu, 28 Aug 2014 07:00:16 +0000 (15:00 +0800)]
intel: refactor intelCreateGraphicsPipeline()

Break it down into

 pipeline_shader()
 builder_validate()
 builder_build()
 builder_init()
 graphics_pipeline_create()

One big difference is that the chain of create info is broken and stored in
flat intel_pipeline_builder.  It is impossible to do any real work with the
chain.

10 years agointel: remove dummy pipeline_get_info()
Chia-I Wu [Thu, 28 Aug 2014 06:37:39 +0000 (14:37 +0800)]
intel: remove dummy pipeline_get_info()

10 years agointel: add some intel_ir info
Chia-I Wu [Thu, 28 Aug 2014 04:18:43 +0000 (12:18 +0800)]
intel: add some intel_ir info

Just the beginning.  More will be needed.

10 years agorender_tests: set BIL generator magic as a hack
Chia-I Wu [Thu, 28 Aug 2014 04:27:21 +0000 (12:27 +0800)]
render_tests: set BIL generator magic as a hack

When the generator magic is 'w', the kernel does

  void main() {
     gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
  }

When the generator magic is 'v', the kernel does

  void main() {
     vec2 vertices[3] = {
        vec2(-1.0, -1.0),
        vec2( 1.0, -1.0),
        vec2( 0.0,  1.0)
     };
     gl_Position = vec4(vertices[gl_VertexID % 3], 0.0, 1.0);
  }

10 years agointel: clean up intel_shader
Chia-I Wu [Thu, 28 Aug 2014 03:36:48 +0000 (11:36 +0800)]
intel: clean up intel_shader

Refactor intelCreateShader() to call shader_create() and shader_parse_bil().
Add intel_ir, which just holds the kernel for now.

10 years agoicd: rename and prefix shader_il.h
Chia-I Wu [Thu, 28 Aug 2014 03:56:29 +0000 (11:56 +0800)]
icd: rename and prefix shader_il.h

Rename shader_il.h to icd-bil.h, and make it more C compatible.  Prefix
everything with icd_.

10 years agointel: fix and clean up shader cache
Chia-I Wu [Thu, 28 Aug 2014 02:43:04 +0000 (10:43 +0800)]
intel: fix and clean up shader cache

intel_cmd_bind is zeroed in cmd_reset().  cmd->bind.shaderCache.shaderList
needs to be freed in cmd_reset(), and cmd_clear_shader_cache() becomes
unnecessary.

cmd->bind.shaderCache.shaderList is an array of intel_cmd_shader, yet the
memory allocated is for an array of intel_shader.  Fix it, and delay the
allocation to emit_shader(), which also takes care of XGL_ERROR_OUT_OF_MEMORY.
Rename shaderList to shaderArray and size to count for clarify.

Do not unconstify things because intel_cmd_shader failed to consitify pointers
in it.

10 years agointel: need only one WA flag so far
Chia-I Wu [Thu, 28 Aug 2014 02:12:34 +0000 (10:12 +0800)]
intel: need only one WA flag so far

We need GEN6_WA_POST_SYNC_FLUSH because we emit the workaround in multiple
places, while we only want the flush to show up in the batch buffer once.  It
is different from the other two workarounds.

10 years agointel: Add command buffer shader cache
Courtney Goeltzenleuchter [Wed, 27 Aug 2014 20:04:53 +0000 (14:04 -0600)]
intel: Add command buffer shader cache

The command buffer shader cache accumulates all the shader kernels
for a particular command buffer. It also checks that it includes a
shader only once.

10 years agointel: Fix bug in create color blend state
Courtney Goeltzenleuchter [Wed, 27 Aug 2014 20:04:17 +0000 (14:04 -0600)]
intel: Fix bug in create color blend state